Add additional check for declined `request_join`

pull/1/head
hikariatama 2022-07-27 17:05:59 +00:00
parent 1413def49e
commit 56e0430f70
1 changed files with 5 additions and 0 deletions

View File

@ -730,6 +730,11 @@ class Modules:
channel = await self.client.get_entity(peer)
if channel.id in self._db.get("hikka.main", "declined_joins", []):
if assure_joined:
raise LoadError(
f"You need to join @{channel.username} in order to use this module"
)
return False
if not isinstance(channel, Channel):