D
D
Dream2021-06-26 18:01:50
Python
Dream, 2021-06-26 18:01:50

Why is the bot reacting to itself and other Discord bots?

How do I prevent my own bot from reacting to itself and other Discord bots??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Nevzorov, 2021-06-27
@dreameddd

For commands - use the commands extension, don't reinvent the wheel:
https://discordpy.readthedocs.io/en/stable/ext/com...
For events - as said before - check if the author is a bot:

if message.author.bot:
    return

A
Anton Neverov, 2021-06-26
@TTATPuOT

Check the sender of the message. If the message was sent by a bot, ignore it.
https://discordpy.readthedocs.io/en/latest/api.htm...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question