Discord.Js Message Link

Viewed 60

So I've looked through the discord.js docs. I'm not too good at reading docs but is there a way to get the url of the message that initiated the command like:

console.log(`${message.content.URL}`)
1 Answers

To get the URL of a message, you can just use .url. The code would look something like:

client.on('messageCreate', (message) => {
    const url = message.url
})
Related