| 12345678910111213 |
- from query.user import is_ignored
- from query.channel import get_games
- async def check_ignore(pg, user, games_channel=None):
- # Ignore user if on the ignore list.
- if await is_ignored(pg, user.id):
- return True
- # Ignore if games are disabled for channel.
- if games_channel: # Invoked by a game command.
- if not await get_games(pg, games_channel.id): # Warn if games are off.
- user.send(f"Games are disabled in {games_channel}, ask an admin to enable them.")
- return True
|