Ask coding questions

← Back to all posts
How do i add the prefix to the commands? [Discord.py]
ExoticCitron

So i need some help, whenever i try coding my bot to say somthing, such as &ping, i want it to be so that when i add the command, and i run it, the prefix '&' and the command 'ping' will show the ping. This shall go for any other commands too. How do i do this?

Voters
ExoticCitron
Comments
hotnewtop
AloegelhiPlaysR

Adding & before every command. So instead of checking for help, try checking for &help

ExoticCitron

@AloegelhiPlaysR so if i get this correctly

what i mean is, where and what do i add to make my commands display the command when inputting &ping?

Like for this command:

i want to add the prefix & to this but how?

tristans2

@Lumiscnt just replace "user_input" with whatever variable contains the user input

ExoticCitron

@tristans2 thanks, i figured it out anyways!