diff --git a/litecord/blueprints/invites.py b/litecord/blueprints/invites.py index f97bd65..f6fb585 100644 --- a/litecord/blueprints/invites.py +++ b/litecord/blueprints/invites.py @@ -91,7 +91,7 @@ async def invite_precheck_gdm(user_id: int, channel_id: int): async def _inv_check_age(inv: dict): - if inv['max_age'] is 0: + if inv['max_age'] != 0: return now = datetime.datetime.utcnow() diff --git a/litecord/gateway/__init__.py b/litecord/gateway/__init__.py deleted file mode 100644 index 3b62d06..0000000 --- a/litecord/gateway/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -""" - -Litecord -Copyright (C) 2018-2019 Luna Mendes - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -""" - -__all__ = ['websocket_handler'] - -from .gateway import websocket_handler diff --git a/litecord/pubsub/lazy_guild.py b/litecord/pubsub/lazy_guild.py index 93c15aa..df5c0dc 100644 --- a/litecord/pubsub/lazy_guild.py +++ b/litecord/pubsub/lazy_guild.py @@ -28,7 +28,7 @@ lazy guilds: import asyncio from collections import defaultdict -from typing import Any, List, Dict, Union, Optional, Iterable, Tuple +from typing import Any, List, Dict, Union, Optional, Iterable, Iterator, Tuple from dataclasses import dataclass, asdict, field from logbook import Logger @@ -113,7 +113,7 @@ class MemberList: yield group, self.data[group.gid] @property - def iter_non_empty(self) -> Generator[Tuple[GroupInfo, List[int]]]: + def iter_non_empty(self) -> Iterator[Tuple[GroupInfo, List[int]]]: """Only iterate through non-empty groups. Note that while the offline group can be empty, it is always diff --git a/run.py b/run.py index 8dcfc51..398896d 100644 --- a/run.py +++ b/run.py @@ -75,7 +75,7 @@ from litecord.images import IconManager from litecord.jobs import JobManager from litecord.voice.manager import VoiceManager -from litecord.gateway import websocket_handler +from litecord.gateway.gateway import websocket_handler from litecord.utils import LitecordJSONEncoder