Skip to content

Instantly share code, notes, and snippets.

@AbstractUmbra
Last active August 17, 2024 20:01
Show Gist options
  • Save AbstractUmbra/a9c188797ae194e592efe05fa129c57f to your computer and use it in GitHub Desktop.
Save AbstractUmbra/a9c188797ae194e592efe05fa129c57f to your computer and use it in GitHub Desktop.
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

@AbstractUmbra
Copy link
Author

Hyperlink is outdated for CommandTree.copy_global_to at Syncing gotchas.

Thanks! Resolved.

@D-Stacks
Copy link

can anyone tell me why i am unable to use slash commands while dming my bot? i have them in a tree, and sync without specifying any guilds, i.e. globally, i assumed this would sync to dms as well. but it just won't work. I know it is possible in theory to dm slash-commands, but i just see no documentation on how to achieve this with discord.py...

@AerixBlox1
Copy link

show me the code @D-Stacks

@AbstractUmbra
Copy link
Author

AbstractUmbra commented Jul 14, 2024

Please don't use this comment section of the gist for debugging or helping, join the discord.py server for that.
Every comment here notifies all watchers, which is usually most people who comment!

I'd recommend that if you're sick of the email spam from this gist, hitting the unsubscribe button at the top right of the page.

(I cannot lock comments here, hence this warning).

@AerixBlox1
Copy link

Alright @AbstractUmbra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment