#Why does my command execute twice

1 messages · Page 1 of 1 (latest)

coral nymph
#

I would like to ask
Why is my message command executed twice (for example, if I send cgoogle, it will return two messages)
I've tried reinstalling disnake, rewriting the code, and even going to the disnake guide to copy the code he provided, to no avail.
This is part of the code I wrote(first picture):

@commands.command(name='google')
  async def google_search_command(self, inter, query = None):
    if query:
      search_url = f"https://www.google.com/search?q={query.replace(' ','+')}"
      await inter.send(f"[{query}]({search_url})")

I copied this from the guide(second picture):

@commands.command()
  async def google(self,ctx, arg):
    await ctx.send(arg)

As for other codes, I put them in replit

river charm
#

You have two bot processes

coral nymph
#

Do you mean I have two servers running the same bot

ashen spear
#

e.g it was started in 2 different terminals or computers

coral nymph
#

Will this happen to repl?

ashen spear
#

Repl has all sorts of problems. I’m really not surprised about that

#

I’d very much avoid repl