GoldyBot.utility.nextcordpy.commands
1import nextcord 2import GoldyBot 3import time 4 5MODULE_NAME = "NEXTCORD COMMANDS" 6 7def find_slash_command(command_name:str) -> nextcord.BaseApplicationCommand: 8 """Goldy Bot function to find a slash command nextcord application object.""" 9 client:nextcord.Client = GoldyBot.cache.main_cache_dict["client"] 10 11 for slash_command in client.get_all_application_commands(): 12 if slash_command.name == command_name: 13 GoldyBot.logging.log(f"[{MODULE_NAME}] The slash command '{command_name}' was found!") 14 return slash_command 15 16 GoldyBot.logging.log("warn", f"[{MODULE_NAME}] The slash command '{command_name}' was NOT found!") 17 return None
def
find_slash_command(command_name: str) -> nextcord.application_command.BaseApplicationCommand:
8def find_slash_command(command_name:str) -> nextcord.BaseApplicationCommand: 9 """Goldy Bot function to find a slash command nextcord application object.""" 10 client:nextcord.Client = GoldyBot.cache.main_cache_dict["client"] 11 12 for slash_command in client.get_all_application_commands(): 13 if slash_command.name == command_name: 14 GoldyBot.logging.log(f"[{MODULE_NAME}] The slash command '{command_name}' was found!") 15 return slash_command 16 17 GoldyBot.logging.log("warn", f"[{MODULE_NAME}] The slash command '{command_name}' was NOT found!") 18 return None
Goldy Bot function to find a slash command nextcord application object.