EQUENOS / dislash.py

A Python wrapper for discord slash-commands and buttons, designed to extend discord.py.

Home Page:https://dislashpy.readthedocs.io/en/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slash Command duplicate and wont change name

TheGenocides opened this issue · comments

So i tried to made a slash command
code:

#Slash Command

slash=SlashClient(Tango())

@slash.command(
    name="echo",
	description="Echo word that you specified",
    options=[
        Option("word", "Specify a word that will get send", Type.STRING, required=True)
    ]
)
async def echo(inter, *,word):
	await inter.reply(word, allowed_mentions=discord.AllowedMentions(everyone=False, users=False, roles=False, replied_user=True))

and it work but, i may found or cause a bug. The slash command name is echo and basically echo an argument but, i accidentally duplicate the command. The echo command and its duplicate work fine but if i remove the command, both name still registered in the bot data and the slash command wont change name if i change the function name, and of course cause errors, one of them is "This interaction failed" and "Invalid interaction application command". My question is, how did the command duplicate and how do i remove it from the bot data?
slash_command

also i use the latest version of dislash

commented

Try kicking the bot and adding it again. This seems to occur when you're registering a command locally for testing, then registering them again globally.

Try kicking the bot and adding it again. This seems to occur when you're registering a command locally for testing, then registering them again globally.

Alright that work, thanks a lot!