Skip to content

Log received DM #9065

Closed Answered by almeidx
Steeven-1002 asked this question in Q&A
Jan 14, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

The message event was renamed to messageCreate on v14

- client.on("message", async message => {
+ client.on("messageCreate", async message => {

Additionally, you might want to ignore messages that aren't from DMs. For that, you can use message.channel.isDMBased(), which returns a boolean

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@Steeven-1002
Comment options

@almeidx
Comment options

almeidx Jan 14, 2023
Collaborator

@Steeven-1002
Comment options

@almeidx
Comment options

almeidx Jan 28, 2023
Collaborator

Answer selected by Jiralite

This comment has been hidden.

@jaw0r3k
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants