Answer the question
In order to leave comments, you need to log in
How to get username from a message?
Hello.
I decided to make myself a bot for my group with the usual functionality /ban /warn /kick, etc.
But the question arose:
The administrator writes the command "/warn @username", how can I get exactly '@username', which is in this message, so that later I can get the id from it and manipulate it.
I understand that you need to get the message "ctx.message.text", it displays the text itself, I display it (screenshot), and then how to get the username?
Thanks in advance to everyone who answers
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question