#Detect slash command use from another bot

1 messages · Page 1 of 1 (latest)

silent sparrow
#

Hi guys. I want to give XP when a user uses /bump. How can i detect that?

charred ocean
#

-d on_message

spice forumBOT
#

disnake.on_message(message)```
Called when a [`Message`](https://docs.disnake.dev/en/latest/api/messages.html#disnake.Message "disnake.Message") is created and sent.

This requires [`Intents.messages`](https://docs.disnake.dev/en/latest/api/clients.html#disnake.Intents.messages "disnake.Intents.messages") to be enabled.

Warning

Your bot’s own messages and private messages are sent through this event. This can lead cases of ‘recursion’ depending on how your bot was programmed. If you want the bot to not reply to itself, consider checking the user IDs. Note that [`Bot`](https://docs.disnake.dev/en/latest/ext/commands/api/bots.html#disnake.ext.commands.Bot "disnake.ext.commands.Bot") does not have this problem.

Note

Not all messages will have `content`. This is a Discord limitation. See the docs of [`Intents.message_content`](https://docs.disnake.dev/en/latest/api/clients.html#disnake.Intents.message_content "disnake.Intents.message_content") for more information.
whole nebula
#

Assuming the response to /bump is sent to a channel the second bot can see and read messages in.
If it's an ephemeral response or otherwise, it's not possible.