2017-11-08 22:33:27 -05:00
|
|
|
from discord.ext.commands import errors as errext
|
|
|
|
|
2017-11-06 02:00:58 -05:00
|
|
|
base = '\N{WARNING SIGN} **An internal error has occurred.** This has been reported to my master. \N{WOLF FACE}'
|
2017-09-24 11:05:28 -04:00
|
|
|
|
2017-10-12 22:26:22 -04:00
|
|
|
|
2017-10-14 21:54:18 -04:00
|
|
|
async def send_error(ctx, error):
|
2017-10-20 16:25:12 -04:00
|
|
|
await ctx.send('{}\n```\n{}```'.format(base, error))
|
|
|
|
|
|
|
|
|
2017-11-08 22:32:48 -05:00
|
|
|
# class NSFW(errext.CheckFailure):
|
|
|
|
# pass
|
|
|
|
|
2017-11-20 02:12:56 -05:00
|
|
|
class SizeError(Exception):
|
|
|
|
pass
|
|
|
|
|
2017-11-08 22:32:48 -05:00
|
|
|
|
2017-11-06 02:04:17 -05:00
|
|
|
class Wrong(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Add(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2017-10-20 16:25:12 -04:00
|
|
|
class Execute(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Evaluate(Exception):
|
|
|
|
pass
|
2017-10-14 21:54:18 -04:00
|
|
|
|
|
|
|
|
2017-10-12 22:26:22 -04:00
|
|
|
class Left(Exception):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Right(Exception):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Save(Exception):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
class GoTo(Exception):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class Exists(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class MissingArgument(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-15 13:30:40 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class FavoritesNotFound(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-16 02:06:50 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class PostError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class ImageError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class MatchError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class TagBlacklisted(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class BoundsError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class TagBoundsError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class TagExists(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class TagError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class FlagError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class BlacklistError(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class NotFound(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class Timeout(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class InvalidVideoFile(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class MissingAttachment(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class TooManyAttachments(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
2017-11-08 22:33:27 -05:00
|
|
|
class CheckFail(errext.CommandError):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Abort(Exception):
|
2017-10-30 00:22:34 -04:00
|
|
|
def __init__(self, message=None):
|
|
|
|
self.message = message
|
2017-10-12 22:26:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Continue(Exception):
|
2017-10-20 16:25:12 -04:00
|
|
|
pass
|