diff --git a/pyproject.toml b/pyproject.toml index 2f225a0..b6c2175 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ exclude = [ "**/starboard.py", "**/uptime.py", "**/working_on.py", - "**/utils/command_utils.py", "**/utils/snailrace_utils.py", ] diff --git a/uqcsbot/holidays.py b/uqcsbot/holidays.py index e8a2f95..16adb0d 100644 --- a/uqcsbot/holidays.py +++ b/uqcsbot/holidays.py @@ -11,12 +11,21 @@ from zoneinfo import ZoneInfo from uqcsbot.bot import UQCSBot -from uqcsbot.utils.command_utils import HYPE_REACTS HOLIDAY_URL = "https://www.timeanddate.com/holidays/fun/" HOLIDAY_CSV_PATH = "uqcsbot/static/geek_holidays.csv" HOLIDAY_MESSAGE = "Today is {}!" GENERAL_CHANNEL = "general" +HYPE_REACTS = [ + "blahaj", + "blobhajHeart", + "realheart", + "blobhajInnocent", + "keen", + "bigsippin", + "pog_of_greed", + "blobhajHearts", +] class Holiday: diff --git a/uqcsbot/utils/command_utils.py b/uqcsbot/utils/command_utils.py deleted file mode 100644 index b81bd74..0000000 --- a/uqcsbot/utils/command_utils.py +++ /dev/null @@ -1,31 +0,0 @@ -from random import choice -from functools import wraps -from typing import Callable -from discord.ext import commands - -LOADING_REACTS = ["⏰", "🕰️", "⏲️", "🕖", "🕔", "🕥"] -HYPE_REACTS = [ - "blahaj", - "blobhajHeart", - "realheart", - "blobhajInnocent", - "keen", - "bigsippin", - "pog_of_greed", - "blobhajHearts", -] - - -def loading_status(command_fn: Callable): - @wraps(command_fn) # Important to preserve name because `command` uses it - async def wrapper(self, ctx: commands.Context, *args): - if ctx.message is None or ctx.bot is None: - return - - react = choice(LOADING_REACTS) - await ctx.message.add_reaction(react) - res = await command_fn(self, ctx, *args) - await ctx.message.remove_reaction(react, ctx.bot.user) - return res - - return wrapper