1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

s/emoji/emotes/

This commit is contained in:
bmintz 2018-07-29 23:42:27 -05:00
parent 3b488ab787
commit b2bab91d36
2 changed files with 11 additions and 11 deletions

View file

@ -23,7 +23,7 @@ from discord.ext import commands
import utils
from utils import errors
class Emoji:
class Emotes:
def __init__(self, bot):
self.bot = bot
self.http = aiohttp.ClientSession(loop=self.bot.loop, read_timeout=30, headers={
@ -209,4 +209,4 @@ class Emoji:
def setup(bot):
bot.add_cog(Emoji(bot))
bot.add_cog(Emotes(bot))

View file

@ -4,37 +4,37 @@
from discord.ext.commands import CommandError
class EmojiManagerError(CommandError):
class EmoteManagerError(CommandError):
"""Generic error with the bot. This can be used to catch all bot errors."""
pass
class HTTPException(EmojiManagerError):
class HTTPException(EmoteManagerError):
"""The server did not respond with an OK status code."""
def __init__(self, status):
super().__init__(f'URL error: server returned error code {status}')
class EmojiNotFoundError(EmojiManagerError):
"""An emoji with that name was not found"""
class EmoteNotFoundError(EmoteManagerError):
"""An emote with that name was not found"""
def __init__(self, name):
super().__init__(f'An emoji called `{name}` does not exist in this server.')
super().__init__(f'An emote called `{name}` does not exist in this server.')
class InvalidImageError(EmojiManagerError):
class InvalidImageError(EmoteManagerError):
"""The image is not a GIF, PNG, or JPG"""
def __init__(self):
super().__init__('The image supplied was not a GIF, PNG, or JPG.')
class NoMoreSlotsError(EmojiManagerError):
class NoMoreSlotsError(EmoteManagerError):
"""Raised in case all slots of a particular type (static/animated) are full"""
def __init__(self):
super().__init__('No more backend slots available.')
class PermissionDeniedError(EmojiManagerError):
"""Raised when a user tries to modify an emoji without the Manage Emojis permission"""
class PermissionDeniedError(EmoteManagerError):
"""Raised when a user tries to modify an emote without the Manage Emojis permission"""
def __init__(self, name):
super().__init__(f"You're not authorized to modify `{name}`.")