diff options
Diffstat (limited to 'bot/exts/utilities/emoji.py')
| -rw-r--r-- | bot/exts/utilities/emoji.py | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/bot/exts/utilities/emoji.py b/bot/exts/utilities/emoji.py index fa438d7f..2b2fab8a 100644 --- a/bot/exts/utilities/emoji.py +++ b/bot/exts/utilities/emoji.py @@ -10,7 +10,6 @@ from discord.ext import commands  from bot.bot import Bot  from bot.constants import Colours, ERROR_REPLIES -from bot.utils.extensions import invoke_help_command  from bot.utils.pagination import LinePaginator  from bot.utils.time import time_since @@ -20,6 +19,9 @@ log = logging.getLogger(__name__)  class Emojis(commands.Cog):      """A collection of commands related to emojis in the server.""" +    def __init__(self, bot: Bot) -> None: +        self.bot = bot +      @staticmethod      def embed_builder(emoji: dict) -> tuple[Embed, list[str]]:          """Generates an embed with the emoji names and count.""" @@ -74,7 +76,7 @@ class Emojis(commands.Cog):          if emoji is not None:              await ctx.invoke(self.info_command, emoji)          else: -            await invoke_help_command(ctx) +            await self.bot.invoke_help_command(ctx)      @emoji_group.command(name="count", aliases=("c",))      async def count_command(self, ctx: commands.Context, *, category_query: str = None) -> None: @@ -120,4 +122,4 @@ class Emojis(commands.Cog):  def setup(bot: Bot) -> None:      """Load the Emojis cog.""" -    bot.add_cog(Emojis()) +    bot.add_cog(Emojis(bot)) | 
