diff options
| author | 2019-10-02 09:39:10 +0530 | |
|---|---|---|
| committer | 2019-10-02 09:39:10 +0530 | |
| commit | cd5842811f92bd5c82a164d33ad71a9c7c172e57 (patch) | |
| tree | 4a15827a3d94cbc78fa8a9a5b47cdd57283f304e /bot/seasons/evergreen/showprojects.py | |
| parent | Worked on the requested changes and also made a few other changes: (diff) | |
| parent | Merge branch 'master' into trivia_quiz (diff) | |
Merge branch 'trivia_quiz' of https://github.com/RohanJnr/seasonalbot into trivia_quiz
Diffstat (limited to '')
| -rw-r--r-- | bot/seasons/evergreen/showprojects.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bot/seasons/evergreen/showprojects.py b/bot/seasons/evergreen/showprojects.py index 37809b33..a943e548 100644 --- a/bot/seasons/evergreen/showprojects.py +++ b/bot/seasons/evergreen/showprojects.py @@ -1,5 +1,6 @@ import logging +from discord import Message from discord.ext import commands from bot.constants import Channels @@ -8,15 +9,15 @@ log = logging.getLogger(__name__) class ShowProjects(commands.Cog): - """Cog that reacts to posts in the #show-your-projects""" + """Cog that reacts to posts in the #show-your-projects.""" - def __init__(self, bot): + 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): - """Adds reactions to posts in #show-your-projects""" + 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 @@ -27,7 +28,7 @@ class ShowProjects(commands.Cog): self.lastPoster = message.author.id -def setup(bot): - """Show Projects Reaction Cog""" +def setup(bot: commands.Bot) -> None: + """Show Projects Reaction Cog.""" bot.add_cog(ShowProjects(bot)) log.info("ShowProjects cog loaded") |