aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-11-21 00:32:36 +0100
committerGravatar Leon Sandøy <[email protected]>2020-11-21 00:49:15 +0100
commit786c01d6a238429eafca38d7ba65cb3323b33ca9 (patch)
treefd1dfe3bef8af3de11a0bb129b9f7e8755ec8f99
parentRemove references to old name. (diff)
Remove dead ShowProjects cog.
We no longer have this channel, so this cog serves no purpose.
-rw-r--r--bot/bot.py2
-rw-r--r--bot/exts/evergreen/showprojects.py33
-rw-r--r--bot/exts/halloween/spookyreact.py4
3 files changed, 2 insertions, 37 deletions
diff --git a/bot/bot.py b/bot/bot.py
index bf4a59c2..97b09243 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -9,7 +9,7 @@ from async_rediscache import RedisSession
from discord import DiscordException, Embed
from discord.ext import commands
-import bot.constants as constants
+from bot import constants
log = logging.getLogger(__name__)
diff --git a/bot/exts/evergreen/showprojects.py b/bot/exts/evergreen/showprojects.py
deleted file mode 100644
index 328a7aa5..00000000
--- a/bot/exts/evergreen/showprojects.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import logging
-
-from discord import Message
-from discord.ext import commands
-
-from bot.constants import Channels
-
-log = logging.getLogger(__name__)
-
-
-class ShowProjects(commands.Cog):
- """Cog that reacts to posts in the #show-your-projects."""
-
- def __init__(self, bot: commands.Bot):
- self.bot = bot
- self.lastPoster = 0 # Given 0 as the default last poster ID as no user can actually have 0 assigned to them
-
- @commands.Cog.listener()
- async def on_message(self, message: Message) -> None:
- """Adds reactions to posts in #show-your-projects."""
- reactions = ["\U0001f44d", "\U00002764", "\U0001f440", "\U0001f389", "\U0001f680", "\U00002b50", "\U0001f6a9"]
- if (message.channel.id == Channels.show_your_projects
- and message.author.bot is False
- and message.author.id != self.lastPoster):
- for reaction in reactions:
- await message.add_reaction(reaction)
-
- self.lastPoster = message.author.id
-
-
-def setup(bot: commands.Bot) -> None:
- """Show Projects Reaction Cog."""
- bot.add_cog(ShowProjects(bot))
diff --git a/bot/exts/halloween/spookyreact.py b/bot/exts/halloween/spookyreact.py
index 21b8ff7c..b335df75 100644
--- a/bot/exts/halloween/spookyreact.py
+++ b/bot/exts/halloween/spookyreact.py
@@ -29,9 +29,7 @@ class SpookyReact(Cog):
@in_month(Month.OCTOBER)
@Cog.listener()
async def on_message(self, ctx: discord.Message) -> None:
- """
- Triggered when the bot sees a message in October.
- """
+ """Triggered when the bot sees a message in October."""
for trigger in SPOOKY_TRIGGERS.keys():
trigger_test = re.search(SPOOKY_TRIGGERS[trigger][0], ctx.content.lower())
if trigger_test: