Spell check and ruff fixes.

This commit is contained in:
2024-08-01 21:46:16 -04:00
parent 47a33128be
commit 07906aaea1
2 changed files with 14 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"cSpell.words": [
"aiofiles",
"blurple",
"CLANLEADER",
"Dakiny",
"DISCORDMANAGER",
"highcouncil"
]
}
+4 -4
View File
@@ -137,7 +137,7 @@ def build_votes_str(config: DakinyConfig, guild: nextcord.Guild) -> str:
Creates a string that contains all nominees and their votes to be sent as a discord message. Creates a string that contains all nominees and their votes to be sent as a discord message.
Args: Args:
config (DakinyConfig): Daking config object config (DakinyConfig): Dakiny config object
guild (nextcord.Guild): The guild object. Used to get display names for sorting. guild (nextcord.Guild): The guild object. Used to get display names for sorting.
Returns: Returns:
@@ -173,7 +173,7 @@ def build_highcouncil_votes_str(config: DakinyConfig, guild: nextcord.Guild) ->
Creates a string that contains all high council nominees and their votes to be sent as a discord message. Creates a string that contains all high council nominees and their votes to be sent as a discord message.
Args: Args:
config (DakinyConfig): Daking config object config (DakinyConfig): Dakiny config object
guild (nextcord.Guild): The guild object. Used to get display names for sorting. guild (nextcord.Guild): The guild object. Used to get display names for sorting.
Returns: Returns:
@@ -374,7 +374,7 @@ def get_allowed_points(session: Session, points_limit: int, user: str, points: i
add_points = ( add_points = (
points points
if limit.Points + points <= points_limit if limit.Points + points <= points_limit
else (points_limit - limit.Points if points_limit - limit.Points > 0 else 0) else (max(0, points_limit - limit.Points))
) )
limit.Points += add_points limit.Points += add_points
@@ -512,7 +512,7 @@ async def edit_clan_message(
async def edit_clan_council_info(guild: nextcord.Guild, config: DakinyConfig) -> None: async def edit_clan_council_info(guild: nextcord.Guild, config: DakinyConfig) -> None:
""" """
Gets the winners of the elections and updates the perminant message that states the current council. Gets the winners of the elections and updates the permanent message that states the current council.
Args: Args:
guild (nextcord.Guild): Guild object that to use to get channel. guild (nextcord.Guild): Guild object that to use to get channel.