From ce355662afd55a5adf95335bbb50058b3eeb7891 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Tue, 6 Jul 2021 17:11:41 +0100 Subject: Allow commands in code jam team channels --- bot/constants.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 7bd10b5f..3b3d7711 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -127,6 +127,7 @@ class Categories(NamedTuple): media = 799054581991997460 staff = 364918151625965579 +codejam_categories_name = "Code Jam" # Name of the codejam team categories class Client(NamedTuple): name = "Sir Lancebot" -- cgit v1.2.3 From 198d22cba0a641f96bd8d1e95a28205cf7df40de Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 6 Jul 2021 21:51:24 +0100 Subject: Remove hacktoberfest channel overrides The hacktoberfest channel has now been removed, so these overrides can also be removed. The commands may still be useful in future, and can be used in lancebot's playground. --- bot/constants.py | 1 - bot/exts/halloween/hacktoberstats.py | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 3b3d7711..ff901c8e 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -113,7 +113,6 @@ class Channels(NamedTuple): off_topic_1 = 463035241142026251 off_topic_2 = 463035268514185226 community_bot_commands = int(environ.get("CHANNEL_COMMUNITY_BOT_COMMANDS", 607247579608121354)) - hacktoberfest_2020 = 760857070781071431 voice_chat_0 = 412357430186344448 voice_chat_1 = 799647045886541885 staff_voice = 541638762007101470 diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index b74e680b..50d3aaf6 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -10,15 +10,14 @@ from async_rediscache import RedisCache from discord.ext import commands from bot.bot import Bot -from bot.constants import Channels, Colours, Month, NEGATIVE_REPLIES, Tokens, WHITELISTED_CHANNELS -from bot.utils.decorators import in_month, whitelist_override +from bot.constants import Colours, Month, NEGATIVE_REPLIES, Tokens +from bot.utils.decorators import in_month 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 REVIEW_DAYS = 14 # number of days needed after PR can be mature -HACKTOBER_WHITELIST = WHITELISTED_CHANNELS + (Channels.hacktoberfest_2020,) REQUEST_HEADERS = {"User-Agent": "Python Discord Hacktoberbot"} # using repo topics API during preview period requires an accept header @@ -44,7 +43,6 @@ class HacktoberStats(commands.Cog): @in_month(Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER) @commands.group(name="hacktoberstats", aliases=("hackstats",), invoke_without_command=True) - @whitelist_override(channels=HACKTOBER_WHITELIST) async def hacktoberstats_group(self, ctx: commands.Context, github_username: str = None) -> None: """ Display an embed for a user's Hacktoberfest contributions. @@ -72,7 +70,6 @@ class HacktoberStats(commands.Cog): @in_month(Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER) @hacktoberstats_group.command(name="link") - @whitelist_override(channels=HACKTOBER_WHITELIST) async def link_user(self, ctx: commands.Context, github_username: str = None) -> None: """ Link the invoking user's Github github_username to their Discord ID. @@ -96,7 +93,6 @@ class HacktoberStats(commands.Cog): @in_month(Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER) @hacktoberstats_group.command(name="unlink") - @whitelist_override(channels=HACKTOBER_WHITELIST) async def unlink_user(self, ctx: commands.Context) -> None: """Remove the invoking user's account link from the log.""" author_id, author_mention = self._author_mention_from_context(ctx) -- cgit v1.2.3