Closed aDu closed 5 years ago
if (bot.directMessages[channelID]) {}
or
if (channelID in bot.directMessages) { }
or something similar
Thanks, it's a fantastic API <3.
Edit: Just found it on the docs after reading your comment, I should've read the docs more thoroughly, sorry <3.
I am listening on the message event. client.on('message', function(user, userID, channelID, message, event) { });`
On this event, I get a userID that is different to the channelID when the bot receives a direct message. When the bot receives a message on a non-DM channel, it's the same.
How do I differentiate between the bot receiving private messages, and the bot receiving it on any other channel?
Thanks!