Reputation: 181
When I type !gamer in a channel, this is what the bot responds with
Although my username is Dairy#6166. To confirm that this is message.author, I had the program print message.author when the code ran:
Yet the bot still doesn't recognize me and says that I'm not Dairy.
Upvotes: 1
Views: 295
Reputation: 11
You must use message.author.name
instead of message.author
in your condition phrase.
Upvotes: 1
Reputation: 2613
The problem with your code is that message.author
returns a member object (docs on member object) which, if converted to a string (which is done when you print it) returns the name. So you need to check message.author.name == "Dairy#6166"
instead of message.author == "Dairy#6166"
Also for future questions you might be asking on stackoverflow, please don't just screenshot your code, but copy and paste it to the question.
Upvotes: 1