Skip to content

Commit

Permalink
Rename attrs to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax146 committed Jul 25, 2024
1 parent 4f09d75 commit 0a28035
Show file tree
Hide file tree
Showing 47 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion techsupport_bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TechSupportBot(commands.Bot):
allowed_mentions (discord.AllowedMentions): What the bot is, or is not,
allowed to mention
Attrs:
Attributes:
CONFIG_PATH (str): The hard coded path to the yaml config file
EXTENSIONS_DIR_NAME (str): The hardcoded folder for commands
EXTENSIONS_DIR (str): The list of all files in the EXTENSIONS_DIR_NAME folder
Expand Down
4 changes: 2 additions & 2 deletions techsupport_bot/botlogging/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LogLevel(Enum):
"""This is a way to map log levels to strings, and have the easy ability
to dynamically add or remove log levels
Attrs:
Attributes:
DEBUG (str): Representation of debug
INFO (str): Representation of info
WARNING (str): Representation of warning
Expand All @@ -30,7 +30,7 @@ class LogContext:
"""A very simple class to store a few contextual items about the log
This is used to determine if some guild settings means the log shouldn't be logged
Attrs:
Attributes:
guild (discord.Guild | None): The guild the log occured with. Optional
channel (discord.abc.Messageble | None): The channel, DM, thread,
or other messagable the log occured in
Expand Down
10 changes: 5 additions & 5 deletions techsupport_bot/botlogging/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LogEmbed(discord.Embed):
Args:
message (str): The message to log. Will become the description of an embed
Attrs:
Attributes:
title (str): The title of the embed
color (discord.Color): The color of the embed
"""
Expand Down Expand Up @@ -49,7 +49,7 @@ def modify_embed(self: Self, embed: discord.Embed) -> discord.Embed:
class InfoEmbed(LogEmbed):
"""Embed for info level log events.
Attrs:
Attributes:
title (str): The title of the embed
color (discord.Color): The color of the embed
"""
Expand All @@ -61,7 +61,7 @@ class InfoEmbed(LogEmbed):
class DebugEmbed(LogEmbed):
"""Embed for debug level log events.
Attrs:
Attributes:
title (str): The title of the embed
color (discord.Color): The color of the embed
"""
Expand All @@ -73,7 +73,7 @@ class DebugEmbed(LogEmbed):
class WarningEmbed(LogEmbed):
"""Embed for warning level log events.
Attrs:
Attributes:
title (str): The title of the embed
color (discord.Color): The color of the embed
"""
Expand All @@ -85,7 +85,7 @@ class WarningEmbed(LogEmbed):
class ErrorEmbed(LogEmbed):
"""Embed for error level log events.
Attrs:
Attributes:
title (str): The title of the embed
color (discord.Color): The color of the embed
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/animal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Animals(cogs.BaseCog):
"""The class for the animals commands
Attrs:
Attributes:
CAT_API_URL (str): The URL for the cat API
DOG_API_URL (str): The URL for the dog API
FOX_API_URL (str): The URL for the fox API
Expand Down
4 changes: 2 additions & 2 deletions techsupport_bot/commands/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ApplicationStatus(Enum):
"""Static string mapping of all status
This is so the database can always be consistent
Attrs:
Attributes:
PENDING (str): The string representation for pending
APPROVED (str): The string representation for approved
DENIED (str): The string representation for denied
Expand Down Expand Up @@ -198,7 +198,7 @@ async def wait(self: Self, config: munch.Munch, guild: discord.Guild) -> None:
class ApplicationManager(cogs.LoopCog):
"""This cog is responsible for the majority of functions in the application system
Attrs:
Attributes:
application_group (app_commands.Group): The group for the /application commands
"""

Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/burn.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Burn(cogs.BaseCog):
"""Class for Burn command on the discord bot.
Attrs:
Attributes:
PHRASES (list[str]): The list of phrases to pick from
"""

Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class ChatGPT(cogs.BaseCog):
"""Main extension class
Attrs:
Attributes:
API_URL (str): The URL for the openai API
SYSTEM_PROMPT (dict[str, str]): The default starting prompt for chatGPT
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/conch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class MagicConch(cogs.BaseCog):
"""Class to create the conch command for discord bot.
Attrs:
Attributes:
RESPONSES (list[str]): The list of random responses for the 8 ball
PIC_URL (str): The direct URL for the picture to put in embeds
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/duck.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class DuckHunt(cogs.LoopCog):
"""Class for the actual duck commands
Attrs:
Attributes:
DUCK_PIC_URL (str): The picture for the duck
BEFRIEND_URL (str): The picture for the befriend target
KILL_URL (str): The picture for the kill target
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Emojis(cogs.BaseCog):
"""Class for all the emoji commands
Attrs:
Attributes:
KEY_MAP (dict[str,str]): Some manual mappings from character to emoji
"""

Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ExtensionControl(cogs.BaseCog):
"""
The class that holds the extension commands
Attrs:
Attributes:
extension_app_command_group (app_commands.Group): The group for the /extension commands
"""

Expand Down
6 changes: 3 additions & 3 deletions techsupport_bot/commands/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class CalledFactoid:
"""A class to allow keeping the original factoid name in tact
Without having to call the database lookup function every time
Attrs:
Attributes:
original_call_str (str): The original name the user provided for a factoid
factoid_db_entry (bot.models.Factoid): The database entry for the original factoid
"""
Expand All @@ -181,7 +181,7 @@ class Properties(Enum):
"""
This enum is for the new factoid all to be able to handle dynamic properties
Attrs:
Attributes:
HIDDEN (str): Representation of hidden
DISABLED (str): Representation of disabled
RESTRICTED (str): Representation of restricted
Expand All @@ -198,7 +198,7 @@ class FactoidManager(cogs.MatchCog):
"""
Manages all factoid features
Attrs:
Attributes:
CRON_REGEX (str): The regex to check if a cronjob is correct
factoid_app_group (app_commands.Group): Group for /factoid commands
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/giphy.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Giphy(cogs.BaseCog):
"""Class for the giphy extension.
Attrs:
Attributes:
GIPHY_URL (str): The URL for the giphy API
SEARCH_LIMIT (int): The max amount of gifs to search for
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class IssueCreator(cogs.BaseCog):
"""
The class that holds the issue commands
Attrs:
Attributes:
GITHUB_API_BASE_URL (str): The URL for the github API
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Googler(cogs.BaseCog):
"""Class for the google extension for the discord bot.
Attrs:
Attributes:
GOOGLE_URL (str): The API URL for google search
YOUTUBE_URL (str): The API URL for youtube search
ICON_URL (str): The google icon
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/grab.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def invalid_channel(ctx: commands.Context) -> bool:
class Grabber(cogs.BaseCog):
"""Class for the actual commands
Attrs:
Attributes:
SEARCH_LIMIT (int): The max amount of messages to search when grabbing
"""

Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/hangman.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class HangmanGame:
"""Class for the game hangman.
Attrs:
Attributes:
HANG_PICS (list[str]): The list of hangman pictures
FINAL_STEP (int): The last step of the hangman game
finished (bool): Determines if the game has been finished or not
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PrintableCommand:
"""A custom class to store formatted information about a command
With a priority on being sortable and searchable
Attrs:
Attributes:
prefix (str): The prefix to call the command with
name (str): The command name
usage (str): The usage hints for the command
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/hug.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Hugger(cogs.BaseCog):
"""Class to make the hug command.
Attrs:
Attributes:
HUGS_SELECTION (list[str]): The list of hug phrases to display
ICON_URL (str): The icon to use when hugging
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/ipinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class IPInfo(cogs.BaseCog):
"""Class to add ipinfo geodata to the bot.
Attrs:
Attributes:
API_URL (str): The API url for IP info
IP_ICON_URL (str): The URL for the IP info icon
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/iss.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class ISSLocator(cogs.BaseCog):
"""Class to locate the ISS at its current position.
Attrs:
Attributes:
ISS_URL (str): The API URL to get the location of the ISS
GEO_URL (str): The API URL to turn lat/lon to location
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/joke.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Joker(cogs.BaseCog):
"""Class to make up the joke extension.
Attrs:
Attributes:
API_URL (str): The joke API URL
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/kanye.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class KanyeQuotes(cogs.LoopCog):
"""Class to get the Kanye quotes from the api.
Attrs:
Attributes:
API_URL (str): The Kanye API URL
KANYE_PICS (list[str]): The list of Kanye pics to pick from randomly
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/lenny.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Lenny(cogs.BaseCog):
"""Class for lenny extension.
Attrs:
Attributes:
LENNYS_SELECTION (list[str]): The list of lenny faces to pick one randomly
"""
Expand Down
4 changes: 2 additions & 2 deletions techsupport_bot/commands/news.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Category(enum.Enum):
"""Class to set up categories for the news.
Attrs:
Attributes:
BUSINESS (str): The string representation for business
ENTERTAINMENT (str): The string representation for entertainment
GENERAL (str): The string representation for general
Expand All @@ -94,7 +94,7 @@ class Category(enum.Enum):
class News(cogs.LoopCog):
"""Class to set up the news extension for the discord bot.
Attrs:
Attributes:
API_URL (str): The news API URL
"""
Expand Down
4 changes: 2 additions & 2 deletions techsupport_bot/commands/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def validate_data(
class ReactionPoller(PollGenerator):
"""Class to add reactions to the poll generator.
Attrs:
Attributes:
OPTION_EMOJIS (list[str]): The list of emojis to react to the message with
STOP_EMOJI (str): The stop emoji to reaction to the message with
EXAMPLE_DATA (dict[str, str | list[str] | int]): The example poll that the bot can use
Expand Down Expand Up @@ -313,7 +313,7 @@ async def wait_for_results(
class StrawPoller(PollGenerator):
"""Class to create a straw poll from discord.
Attrs:
Attributes:
EXAMPLE_DATA (dict[str, str | list[str]]): The example poll that the bot can use
API_URL (str): The strawpoll API URL
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/protect.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Protector(cogs.MatchCog):
"""Class for the protector command.
Attrs:
Attributes:
ALERT_ICON_URL (str): The icon for the alert messages
CLIPBOARD_ICON_URL (str): The icon for the paste messages
CHARS_PER_NEWLINE (int): The arbitrary length of a line
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class DiscordToIRC(cogs.MatchCog):
"""The discord side of the relay
Attrs:
Attributes:
mapping (bidict): The dict that holds the IRC and discord mappings
"""
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 @@ -56,7 +56,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class RoleGiver(cogs.BaseCog):
"""The main class for the role commands
Attrs:
Attributes:
role_group (app_commands.Group): The group for the /role commands
Args:
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/roll.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Roller(cogs.BaseCog):
"""Class for the roll command for the extension.
Attrs:
Attributes:
ICON_URL (str): The URL for the dice icon
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Rules(cogs.BaseCog):
"""Class to define the rules for the extension.
Attrs:
Attributes:
RULE_ICON_URL (str): The icon to use for the rules
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Spotify(cogs.BaseCog):
"""Class for setting up the Spotify extension.
Attrs:
Attributes:
AUTH_URL: The URL for the authentication API for spotify
API_URL: The URL for the search spotify API
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class Translator(cogs.BaseCog):
"""Class to set up the translate extension.
Attrs:
Attributes:
API_URL (str): The translated API URL
"""
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/commands/urban.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
class UrbanDictionary(cogs.BaseCog):
"""Class for setting up the urban dictionary extension.
Attrs:
Attributes:
BASE_URL (str): The base API URL for urban dict
SEE_MORE_URL (str): The URL to link to search results from the API
ICON_URL (str): The urban dict icon URL
Expand Down
Loading

0 comments on commit 0a28035

Please sign in to comment.