Can a Discord bot execute another bot's slash commands?

Hey everyone! I’m trying to figure out if it’s possible for one Discord bot to use slash commands that belong to another bot. Here’s what I’m dealing with:

I’ve got Bot A and Bot B. I want Bot A to be able to trigger Bot B’s slash commands. For example, if Bot A sends /help, I want it to actually execute Bot B’s help command, not just send the text /help as a message.

Right now, when Bot A sends /help, it’s just sending it as plain text. It’s not activating the slash command functionality.

Is this even doable? Has anyone managed to get one bot to use another bot’s slash commands? If it is possible, how would I go about setting this up?

Thanks in advance for any help or insights!

I’ve actually encountered this issue before while working on a project. Unfortunately, Discord’s API doesn’t allow bots to directly execute slash commands of other bots. It’s a security measure to prevent potential abuse.

However, there’s a workaround I’ve used that might help. If you have control over both bots, you can set up a custom API or use a shared database. This way, Bot A can send a request to your API, which then triggers Bot B to perform the desired action.

Another option is to have Bot A send a specific message that Bot B is programmed to recognize and respond to. It’s not as sleek as using slash commands, but it gets the job done.

Remember, these solutions require more setup and aren’t as straightforward as directly using slash commands, but they can achieve similar functionality. Good luck with your project!

As far as I’m aware, it’s not possible for one bot to directly execute another bot’s slash commands. Discord’s slash command system is designed to be user-initiated, not bot-initiated. Bots can’t impersonate users or other bots in this way.

However, you might be able to achieve a similar result by having Bot A send a regular message that triggers Bot B to perform the desired action. This would require setting up Bot B to respond to specific text commands in addition to its slash commands.

Alternatively, if you control both bots, you could implement an API or shared database that allows them to communicate and trigger actions in each other indirectly. This would be more complex but could achieve the functionality you’re looking for.

sry but i dont think bots can use other bots slash commands :frowning: discord doesnt allow that. maybe u could make bot A send a message that bot B responds to? or if u control both bots, u could set up some kinda communication between them. but yeah, no direct slash command execution between bots afaik