Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make a discord bot use other discord bot commands?

im creating a discord bot in python and i would like to make my bot command the music bot to play music. for example i want my bot to write /play prompet:[SONG_NAME] in a chat room and let it be recognized and played by the other music bot. if someone has an idea to make it work please help!

i been trying to just write a string with my own bot "/play prompet:[SONG_NAME]" but the other bot is not reacting.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can’t do this. Discord.py by default doesn’t invoke commands on messages of other bots, unless you override on_message and call process_commands without checking the message author.

Consequently, if the bot is not yours and you cannot control it, there’s nothing you can do about it. If the other bot allows it then it will work without you having to do anything.

Invoking slash commands from chat will never work, as they’re not made to be called by bots.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading