diff options
| author | 2020-03-28 15:13:26 +0100 | |
|---|---|---|
| committer | 2020-03-28 15:13:26 +0100 | |
| commit | 294915013680c9ad205d6c9fa0c7fa2b79cc1919 (patch) | |
| tree | 117612b7f890e35010fe53575879edc1c41362e0 /bot/seasons/evergreen/showprojects.py | |
| parent | Deseasonify: info log on help cog load (diff) | |
Deseasonify: rename `seasons` pkg to `exts`
It is believed that this is now a more logical name for the package,
as extensions no longer bind to seasons.
Internally, packages are still grouped into seasonal sub-packages.
There are quite a few, and it makes sense to group them by a common
theme that inspired their functionality.
Diffstat (limited to 'bot/seasons/evergreen/showprojects.py')
| -rw-r--r-- | bot/seasons/evergreen/showprojects.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/bot/seasons/evergreen/showprojects.py b/bot/seasons/evergreen/showprojects.py deleted file mode 100644 index a943e548..00000000 --- a/bot/seasons/evergreen/showprojects.py +++ /dev/null @@ -1,34 +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)) - log.info("ShowProjects cog loaded") |