diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index a9a416913..5683000d4 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -700,7 +700,6 @@ async def match(self, config, _: commands.Context, message_contents: str) -> boo Args: config (Config): The config to get the prefix from - _ (commands.Context): Ctx, not used message_contents (str): The message to check Returns: @@ -715,7 +714,6 @@ async def response(self, config, ctx: commands.Context, message_content: str, _) config (Config): The server config ctx (commands.Context): Context of the call message_content (str): Content of the call - _ (bool): Result, unused Raises: custom_errors.FactoidNotFoundError: Raised if a broken alias is present in the DB diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index 728b3089c..d1468a109 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -135,7 +135,6 @@ async def on_typing( Args: channel (discord.Channel): The channel where someone started typing user (discord.User): The user who started typing - _ (datetime.datetime): The timestamp of when typing started, unused """ if isinstance(channel, discord.DMChannel) and user.id in active_threads: await self.get_channel(active_threads[user.id]).typing() diff --git a/techsupport_bot/functions/autoreact.py b/techsupport_bot/functions/autoreact.py index 0105a9f32..1581904d2 100644 --- a/techsupport_bot/functions/autoreact.py +++ b/techsupport_bot/functions/autoreact.py @@ -1,6 +1,8 @@ """Module for the autoreact extension for the discord bot.""" +import munch from core import auxiliary, cogs, extensionconfig +from discord.ext import commands async def setup(bot): @@ -21,12 +23,13 @@ async def setup(bot): class AutoReact(cogs.MatchCog): """Class for the autoreact to make it to discord.""" - async def match(self, config, _, content): + async def match( + self, config: munch.Munch, _: commands.Context, content: str + ) -> bool: """A match function to determine if somehting should be reacted to Args: config (munch.Munch): The guild config for the running bot - _ (commands.Context): The context in which the message was sent in content (str): The string content of the message Returns: @@ -39,14 +42,15 @@ async def match(self, config, _, content): return True return False - async def response(self, config, ctx, content, _): + async def response( + self, config: munch.Munch, ctx: commands.Context, content: str, _: bool + ): """The function to generate and add reactions Args: config (munch.Munch): The guild config for the running bot ctx (commands.Context): The context in which the message was sent in content (str): The string content of the message - _ (bool): The result from the match function """ search_content = f" {content} " search_content = search_content.lower() diff --git a/techsupport_bot/ircrelay/irc.py b/techsupport_bot/ircrelay/irc.py index b9f60133f..78e481321 100644 --- a/techsupport_bot/ircrelay/irc.py +++ b/techsupport_bot/ircrelay/irc.py @@ -82,7 +82,6 @@ def on_nicknameinuse( Args: connection (irc.client.ServerConnection): The IRC connection - _ (irc.client.Event): The event object that triggered this function """ connection.nick(connection.get_nickname() + "_") @@ -95,7 +94,6 @@ def on_welcome( Args: connection (irc.client.ServerConnection): The IRC connection - _ (irc.client.Event): The event object that triggered this function """ self.console.info("Connected to IRC") self.ready = True @@ -143,7 +141,6 @@ def on_privmsg( Currently just sends a message to the discord bot owners DMs Args: - _ (irc.client.ServerConnection): The IRC connection event (irc.client.Event): The event object that triggered this function """ asyncio.run_coroutine_threadsafe( @@ -158,7 +155,6 @@ def on_pubmsg( If the channel is linked to a discord channel, the message will get sent to discord Args: - _ (irc.client.ServerConnection): The IRC connection event (irc.client.Event): The event object that triggered this function """ split_message = formatting.parse_irc_message(event=event) @@ -272,7 +268,6 @@ def on_mode(self, _: irc.client.ServerConnection, event: irc.client.Event) -> No Currently just handles ban notifications Args: - _ (irc.client.ServerConnection): The IRC connection event (irc.client.Event): The event object that triggered this function """ # Parse the mode change event