Files
ShiteMusicBot/cogs/music/music_errors.py
T
Ev-1 80d1cdc184 Beginning of large restructuring of music cog.
Restructures the music cog into a module

Renames cogs to cogmanager
Fixes subcommand help invocation
More to assignment expressions in settings
2020-09-11 16:46:46 +02:00

21 lines
568 B
Python

# define Python user-defined exceptions
# Discord Packages
from discord.ext.commands import CommandError
class WrongChannelError(CommandError):
def __init__(self, e: str, channels=None):
self.original = e
self.channels = channels
super().__init__()
class WrongVoiceChannelError(WrongChannelError):
def __init__(self, e: str, channels=None):
super().__init__(e, channels=channels)
class WrongTextChannelError(WrongChannelError):
def __init__(self, e: str, channels=None):
super().__init__(e, channels=channels)