Discord.py - Send message under different name or user

I've been working on a bot and there was a small request, which I have no idea how to do.

When user types their message, the bot checks whether the message contains a predetermined keyword (to put everything into perspective, I'm using examples from an already working BOT), replace this part (for example an emoji) and post the message again, under the name of the user, which posted the message. (I do not want to do exactly this, I just want to know how to "post as another user" like Animated Emojis bot).

It works like this:

Example of image

Also somehow, the user created is not a valid user, since they don't have any roles or can be messaged. This is what happens if you click on their profile (in chat):

Invalid profile

As I've said before, this is somehow possible (the animated emojis bot is one of the examples) and I wonder, how can I do something like this.

Thanks in advance and I hope you have lovely day!



from Recent Questions - Stack Overflow https://ift.tt/2MpDbrg
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)