aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2023-05-01 14:20:31 +0100
committerGravatar shtlrs <[email protected]>2023-05-06 13:20:46 +0100
commit64e1ac315daf4d17da02790859baebbbbb7bdfc4 (patch)
tree15c3e2973685408b11272a34af1bc2de58580e28 /bot/utils
parentupdate Categories (diff)
update Client constants
This also renames the Client class to Bot, to align better with Python.
Diffstat (limited to 'bot/utils')
-rw-r--r--bot/utils/__init__.py6
-rw-r--r--bot/utils/checks.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/bot/utils/__init__.py b/bot/utils/__init__.py
index 91682dbc..69439d91 100644
--- a/bot/utils/__init__.py
+++ b/bot/utils/__init__.py
@@ -9,7 +9,7 @@ from typing import Optional
import discord
from discord.ext.commands import BadArgument, Context
-from bot.constants import Client, Month
+from bot.constants import Bot, Month
from bot.utils.pagination import LinePaginator
@@ -25,8 +25,8 @@ def resolve_current_month() -> Month:
If the env variable was set, current month always resolves to the configured value.
Otherwise, the current UTC month is given.
"""
- if Client.month_override is not None:
- return Month(Client.month_override)
+ if Bot.month_override is not None:
+ return Month(Bot.month_override)
else:
return Month(datetime.utcnow().month)
diff --git a/bot/utils/checks.py b/bot/utils/checks.py
index 857b6746..f21d2ddd 100644
--- a/bot/utils/checks.py
+++ b/bot/utils/checks.py
@@ -74,7 +74,7 @@ def in_whitelist_check(
return True
category = getattr(ctx_channel, "category", None)
- if category and category.name == constants.codejam_categories_name:
+ if category and category.name == constants.CODEJAM_CATEGORY_NAME:
log.trace(f"{ctx.author} may use the `{ctx.command.name}` command as they are in a codejam team channel.")
return True