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
9 changes: 4 additions & 5 deletions techsupport_bot/commands/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,10 @@ async def build_application_embed(
"""This builds the embed that will be sent to staff

Args:
applicant (discord.Member): The member who has applied
background (str): The answer to the background question
reason (str): The answer to the reason question
new (bool, Optional): If the application is new and the title should include new.
Defaults to True
guild (discord.Guild): The guild the user has applied to
application (bot.models.Applications): The database entry of the application
new (bool, optional): If the application is new and the title should
include new. Defaults to True.

Returns:
discord.Embed: The stylized embed ready to be show to people
Expand Down
9 changes: 2 additions & 7 deletions techsupport_bot/commands/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,6 @@ async def modify_factoid_call(

Args:
factoid (Factoid): Factoid to modify.
factoid_name (str, optional): New factoid name. Defaults to None.
message (str, optional): New factoid message. Defaults to None.
embed_config (str, optional): Whether the factoid has an embed set up. Defaults to None.
hidden (bool, optional): Whether the factoid is hidden. Defaults to None.
alias (str, optional): New parent factoid. Defaults to None.

Raises:
custom_errors.TooLongFactoidMessageError:
Expand Down Expand Up @@ -657,7 +652,7 @@ async def delete_factoid(

Args:
ctx (commands.Context): Context to send the confirmation message to
factoid_name (CalledFactoid): The factoid to remove
called_factoid (CalledFactoid): The factoid to remove

Returns:
(bool): Whether the factoid was deleted
Expand Down Expand Up @@ -816,7 +811,7 @@ async def send_to_irc(
"""Send a factoid to IRC channel, if it was called in a linked channel

Args:
ctx (discord.abc.Messageable): The channel the factoid was sent in
channel (discord.abc.Messageable): The channel the factoid was sent in
message (discord.Message): The message object of the invocation
factoid_message (str): The text of the factoid to send
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def get_members_with_role(
Args:
ctx (command.Context): Used to return a message
member_list (list): A list of members to parse
role (str): The role to check for
role_name (str): The role to check for
"""
# All roles are handled using a shorthand for loop because all
# `.roles` attributes have lists of role objects, we want the names.
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ async def log_closure(

Args:
thread (discord.Thread): The thread that got closed
user (int): The id of the person who created the thread, not an user object to
user_id (int): The id of the person who created the thread, not an user object to
be able to include the ID even if the user leaves the guild
log_channel (discord.TextChannel): The log channel to send the closure message to
closed_by (discord.User): The person who closed the thread
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ async def modify_roles(
to the user. Any roles not on this list will be removed
guild (discord.Guild): The guild to assign the roles in
user (discord.Member): The member to assign roles to
resaon (str): The reason to add to the audit log
reason (str): The reason to add to the audit log
interaction (discord.Interaction): The interaction to respond to
"""
added_roles = []
Expand Down
1 change: 0 additions & 1 deletion techsupport_bot/core/auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ async def get_json_from_attachments(
"""Returns concatted JSON from a message's attachments.

parameters:
ctx (discord.ext.Context): the context object for the message
message (Message): the message object
as_string (bool): True if the serialized JSON should be returned
allow_failure (bool): True if an exception should be ignored when parsing attachments
Expand Down
22 changes: 11 additions & 11 deletions techsupport_bot/core/cogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ async def match(
"""Runs a boolean check on message content.

parameters:
config (dict): the config associated with the context
ctx (context): the context object
content (str): the message content
_config (dict): the config associated with the context
_ctx (context): the context object
_content (str): the message content
"""
return True

Expand All @@ -155,9 +155,9 @@ async def response(
"""Performs a response if the match is valid.

parameters:
config (dict): the config associated with the context
ctx (context): the context object
content (str): the message content
_config (dict): the config associated with the context
_ctx (context): the context object
_content (str): the message content
"""


Expand Down Expand Up @@ -374,9 +374,9 @@ async def execute(
"""Runs sequentially after each wait method.

parameters:
config (munch.Munch): the config object for the guild
guild (discord.Guild): the guild associated with the execution
target_channel (discord.Channel): the channel object to use
_config (munch.Munch): the config object for the guild
_guild (discord.Guild): the guild associated with the execution
_target_channel (discord.Channel): the channel object to use
"""

async def _default_wait(self) -> None:
Expand All @@ -387,7 +387,7 @@ async def wait(self, _config: munch.Munch, _guild: discord.Guild) -> None:
"""The default wait method.

parameters:
config (munch.Munch): the config object for the guild
guild (discord.Guild): the guild associated with the execution
_config (munch.Munch): the config object for the guild
_guild (discord.Guild): the guild associated with the execution
"""
await self._default_wait()
2 changes: 1 addition & 1 deletion techsupport_bot/core/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, bot: bot.TechSupportBot) -> None:
except AttributeError:
print("No linx API URL found. Not rate limiting linx")

async def http_call(self, method, url, *args, **kwargs):
async def http_call(self, method: str, url: str, *args, **kwargs):
"""Makes an HTTP request.

By default this returns JSON/dict with the status code injected.
Expand Down