Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions techsupport_bot/commands/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion techsupport_bot/commands/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 8 additions & 4 deletions techsupport_bot/functions/autoreact.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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:
Expand All @@ -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()
Expand Down
5 changes: 0 additions & 5 deletions techsupport_bot/ircrelay/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() + "_")

Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down