Initial commit with code
This commit is contained in:
2
classes/errors/__init__.py
Normal file
2
classes/errors/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from .pycord_guild import GuildNotFoundError
|
||||
from .pycord_user import UserNotFoundError
|
7
classes/errors/pycord_guild.py
Normal file
7
classes/errors/pycord_guild.py
Normal file
@@ -0,0 +1,7 @@
|
||||
class GuildNotFoundError(Exception):
|
||||
"""PycordGuild could not find guild with such an ID in the database"""
|
||||
|
||||
def __init__(self, guild_id: int) -> None:
|
||||
self.guild_id = guild_id
|
||||
|
||||
super().__init__(f"Guild with id {self.guild_id} was not found")
|
7
classes/errors/pycord_user.py
Normal file
7
classes/errors/pycord_user.py
Normal file
@@ -0,0 +1,7 @@
|
||||
class UserNotFoundError(Exception):
|
||||
"""PycordUser could not find user with such an ID in the database"""
|
||||
|
||||
def __init__(self, user_id: int) -> None:
|
||||
self.user_id = user_id
|
||||
|
||||
super().__init__(f"User with id {self.user_id} was not found")
|
Reference in New Issue
Block a user