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

Hey everyone! I’m trying to figure out if it’s possible to make one Discord bot use the slash commands of a different bot. Right now when I try to make my bot send something like /help it just sends the text as a regular message instead of activating the slash command function.

I’ve been scratching my head over this for a while now. Is there any way to make this work? Or is it just not possible for bots to use each other’s slash commands?

Here’s a quick example of what I’m trying to do:

@bot.event
def on_message(message):
    if message.content.startswith('/help'):
        await message.channel.send('/help')
        # This just sends '/help' as text, not as a slash command

# What I'm hoping for:
# async def trigger_other_bot_command():
#     await other_bot.slash_commands['help'].invoke()

Any ideas or suggestions would be super helpful! Thanks in advance!

As someone who’s worked extensively with Discord bots, I can tell you that it’s not possible for one bot to directly trigger another bot’s slash commands. This is a security measure implemented by Discord to prevent potential abuse or automation of bot interactions.

However, there’s a workaround you might consider. Instead of trying to make your bot execute another bot’s slash command, you could program your bot to send a message that prompts a user to use the other bot’s command. For example:

@bot.command()
async def suggest_help(ctx):
    await ctx.send('To get help, use the /help command from OtherBot')

This way, your bot can guide users to the appropriate commands without directly interfering with other bots’ functionalities. It’s not exactly what you were aiming for, but it’s a solution that respects Discord’s security boundaries while still achieving a similar end goal.

nah, bots can’t use other bots’ slash commands. its a discord thing for safety. but you could make ur bot suggest the command instead. like:

@bot.command()
async def hint_help(ctx):
await ctx.send(‘yo, try /help for info’)

not exactly what u wanted, but it gets the job done sorta

I’ve encountered this issue before, and unfortunately, it’s not feasible for one bot to directly trigger another bot’s slash commands. Discord’s design intentionally prevents this to maintain security and avoid potential misuse.

However, you could implement a workaround by having your bot send a message that guides users to use the other bot’s slash command. For instance:

@bot.command()
async def suggest_help(ctx):
    await ctx.send('Need assistance? Try using /help command.')

This approach doesn’t directly execute the slash command but prompts users to do so. It’s not ideal, but it’s the closest solution within Discord’s current limitations. Remember, each bot operates independently, and they can’t directly interact with each other’s slash commands.