Standardize autocomplete function names.

This commit is contained in:
alwayscompiling
2022-12-07 21:52:36 -05:00
parent 6c5f40f788
commit 91e57c6555
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
def __init__(self) -> None:
"""
Default constructor for DeleteCog class. Sets internal bot variable.
Default constructor for DeleteCog class.
"""
@nextcord.slash_command(default_member_permissions=nextcord.Permissions(administrator=True))
@@ -201,7 +201,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
@from_category.on_autocomplete("group_id")
@from_group.on_autocomplete("group_id")
async def autocomplete_group(self, interaction: nextcord.Interaction, group_id: str):
async def group_autocomplete(self, interaction: nextcord.Interaction, group_id: str):
"""
Autocomplete function for table names.
@@ -212,7 +212,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
await interaction.response.send_autocomplete(autofill_groups(interaction.guild_id, group_id))
@from_category.on_autocomplete("category_id")
async def autocomplete_category(self, interaction: nextcord.Interaction, category_id: str, group_id: str):
async def category_autocomplete(self, interaction: nextcord.Interaction, category_id: str, group_id: str):
"""
Autocomplete function for category names.
@@ -227,7 +227,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
@from_category.on_autocomplete("user_name")
@from_group.on_autocomplete("user_name")
async def autocomplete_user(
async def user_autocomplete(
self, interaction: nextcord.Interaction, user_name: str, group_id: str, category_id: Optional[str] = None
):
"""
@@ -247,7 +247,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
)
@users.on_autocomplete("user_name")
async def username_autofill(self, interaction: nextcord.Interaction, username: str):
async def all_users_autocomplete(self, interaction: nextcord.Interaction, username: str):
"""
Sends response from autofill_users_in_guild back to update_username for autocompletion of old_username.
+1 -1
View File
@@ -101,7 +101,7 @@ class RefreshCog(commands.Cog, name="Refresh Cog"):
await interaction.send(f"Posted all groups in {interaction.guild.name}'s highscores.", ephemeral=True)
@group.on_autocomplete("group_id")
async def refresh_table_autofill(self, interaction: nextcord.Interaction, group_id: str):
async def group_autocomplete(self, interaction: nextcord.Interaction, group_id: str):
"""
Collects list of table names and compares to input table name for autocomplete assistance.
+1 -1
View File
@@ -193,7 +193,7 @@ class SetCog(commands.Cog, name="Set command."):
@group_output_channel.on_autocomplete("group_id")
@category_pad_length.on_autocomplete("group_id")
@username_length.on_autocomplete("group_id")
async def group_id_autocomplete(self, interaction: nextcord.Interaction, group_id: str):
async def group_autocomplete(self, interaction: nextcord.Interaction, group_id: str):
"""
Sends results from autofill_groups back to group_output_channel for autocompletion of group_id.
+1 -1
View File
@@ -73,7 +73,7 @@ class UpdateCog(commands.Cog, name="Update commands."):
await interaction.send("Request sent to admins for verification.", ephemeral=True)
@username.on_autocomplete("old_username")
async def username_autofill(self, interaction: nextcord.Interaction, username: str):
async def all_users_autocomplete(self, interaction: nextcord.Interaction, username: str):
"""
Sends response from autofill_users_in_guild back to update_username for autocompletion of old_username.