mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 20:51:14 +00:00
backport: Message#url getter
This commit is contained in:
parent
95a2d25b7d
commit
41f6eaa635
1 changed files with 9 additions and 0 deletions
|
|
@ -215,6 +215,15 @@ class Message {
|
||||||
return this.channel.guild || null;
|
return this.channel.guild || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The url to jump to the message
|
||||||
|
* @type {string}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
get url() {
|
||||||
|
return `https://discordapp.com/channels/${this.guild ? this.guild.id : '@me'}/${this.channel.id}/${this.id}`;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The message contents with all mentions replaced by the equivalent text.
|
* The message contents with all mentions replaced by the equivalent text.
|
||||||
* If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.
|
* If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue