#๐Ÿ”’ Discord Bot (Sync?) Commd Listing in DC / Command List

14 messages ยท Page 1 of 1 (latest)

open silo
#

Hey, i have a Programm wich should theoretigly (sync?) with discord and should show the commands in the list when you type /. But it doesn't, also now i cant run any command because it says 'command "x" not found'

https://pastebin.com/BXbnU6bD

sleek cipherBOT
#

@open silo

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wicked fjord
#

Have you reloaded discord with ctrl + R?
Also you should not sync commands in on_ready

open silo
#

whrere then?

wicked fjord
#

I dont know because I dont use discord.py.
I think there is something called the setup_hook which is a bit better. Or just sync them manually with a prefix command or something

slow matrix
#

Dpy allows Optional type hint on slash command parameters?
async def delete_messages(interaction: discord.Interaction, amount: Optional[int])

#

Last time I tried it, it failed

open silo
#

jeah it didnt crash so yes?

slow matrix
#

Hm

vague pier
#

Don't sync commands in the on_ready event, you can create a prefixed command and sync them manually.

open silo
#

okay thank you guys

#

!close

sleek cipherBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.