aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/seasons/halloween/hacktoberstats.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/seasons/halloween/hacktoberstats.py b/bot/seasons/halloween/hacktoberstats.py
index 3e9bd508..035eafbc 100644
--- a/bot/seasons/halloween/hacktoberstats.py
+++ b/bot/seasons/halloween/hacktoberstats.py
@@ -10,8 +10,8 @@ import aiohttp
import discord
from discord.ext import commands
-from bot.constants import Channels, STAFF_ROLES, WHITELISTED_CHANNELS
-from bot.decorators import in_channel_check
+from bot.constants import Channels, WHITELISTED_CHANNELS
+from bot.decorators import override_in_channel
from bot.utils.persist import make_persistent
@@ -19,6 +19,7 @@ log = logging.getLogger(__name__)
CURRENT_YEAR = datetime.now().year # Used to construct GH API query
PRS_FOR_SHIRT = 4 # Minimum number of PRs before a shirt is awarded
+HACKTOBER_WHITELIST = WHITELISTED_CHANNELS + (Channels.hacktoberfest_2019,)
class HacktoberStats(commands.Cog):
@@ -29,8 +30,8 @@ class HacktoberStats(commands.Cog):
self.link_json = make_persistent(Path("bot", "resources", "halloween", "github_links.json"))
self.linked_accounts = self.load_linked_users()
- @commands.check(in_channel_check(*(*WHITELISTED_CHANNELS, Channels.hacktoberfest_2019), bypass_roles=STAFF_ROLES))
@commands.group(name="hacktoberstats", aliases=("hackstats",), invoke_without_command=True)
+ @override_in_channel(HACKTOBER_WHITELIST)
async def hacktoberstats_group(self, ctx: commands.Context, github_username: str = None) -> None:
"""
Display an embed for a user's Hacktoberfest contributions.