2022-09-18 01:16:19 +02:00
|
|
|
from typing import Union
|
|
|
|
|
|
|
|
import discord
|
|
|
|
|
|
|
|
import settings
|
|
|
|
|
|
|
|
__all__ = ["NotInMainGuildException"]
|
|
|
|
|
|
|
|
|
|
|
|
class NotInMainGuildException(ValueError):
|
|
|
|
"""Exception raised when a user is not a member of the main guild"""
|
|
|
|
|
|
|
|
def __init__(self, user: Union[discord.User, discord.Member]):
|
|
|
|
super().__init__(
|
2023-07-08 15:38:17 +02:00
|
|
|
f"User {user.display_name} (id `{user.id}`) "
|
|
|
|
f"is not a member of the configured main guild (id `{settings.DISCORD_MAIN_GUILD}`)."
|
2022-09-18 01:16:19 +02:00
|
|
|
)
|