aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities/emoji.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-08-23 20:46:14 +0100
committerGravatar Chris Lovering <[email protected]>2022-09-21 23:02:55 +0100
commitcc2dcdcdbf9e6057053bdb72bba848f4c2e19cbd (patch)
tree75c87793362d786bb2c45fea8fb235435e44c315 /bot/exts/utilities/emoji.py
parentMove startup checks and logs to their own cog (diff)
Use extension utils from bot-core
Diffstat (limited to 'bot/exts/utilities/emoji.py')
-rw-r--r--bot/exts/utilities/emoji.py8
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))