mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
Fix MessageMentions properties always being null or empty (#1357)
This commit is contained in:
@@ -127,7 +127,7 @@ class Message {
|
|||||||
* All valid mentions that the message contains
|
* All valid mentions that the message contains
|
||||||
* @type {MessageMentions}
|
* @type {MessageMentions}
|
||||||
*/
|
*/
|
||||||
this.mentions = new Mentions(this, data.mentions, data.mentions_roles, data.mention_everyone);
|
this.mentions = new Mentions(this, data.mentions, data.mention_roles, data.mention_everyone);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the webhook that sent the message, if applicable
|
* ID of the webhook that sent the message, if applicable
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class MessageMentions {
|
|||||||
*/
|
*/
|
||||||
get members() {
|
get members() {
|
||||||
if (this._members) return this._members;
|
if (this._members) return this._members;
|
||||||
if (!this.guild) return null;
|
if (!this._guild) return null;
|
||||||
this._members = new Collection();
|
this._members = new Collection();
|
||||||
this.users.forEach(user => {
|
this.users.forEach(user => {
|
||||||
const member = this._guild.member(user);
|
const member = this._guild.member(user);
|
||||||
@@ -100,7 +100,7 @@ class MessageMentions {
|
|||||||
*/
|
*/
|
||||||
get channels() {
|
get channels() {
|
||||||
if (this._channels) return this._channels;
|
if (this._channels) return this._channels;
|
||||||
if (!this.guild) return null;
|
if (!this._guild) return null;
|
||||||
this._channels = new Collection();
|
this._channels = new Collection();
|
||||||
let matches;
|
let matches;
|
||||||
while ((matches = this.constructor.CHANNELS_PATTERN.exec(this._content)) !== null) {
|
while ((matches = this.constructor.CHANNELS_PATTERN.exec(this._content)) !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user