简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM