N
N
NiicKz2022-03-17 00:11:19
Python
NiicKz, 2022-03-17 00:11:19

How to check if a message is in discord.py?

I want the bot to check if the message was sent to him when he sends a message. For example, they send "hello" to the bot, and he also answers "hello". And if not in HP, but on some servers, then it simply does not respond. Is it possible to do so? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shurshur, 2022-03-17
@shurshur

Use the channel.type property . You can also use the commands.dm_only decorator for commands .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question