refactor: Move me and add fetchMe()

#9029 djs
This commit is contained in:
March 7th
2023-01-10 18:08:05 +07:00
parent 579edfa8fe
commit f53d329462
15 changed files with 77 additions and 29 deletions

View File

@@ -638,7 +638,7 @@ class Message extends Base {
return Boolean(
this.author.id === this.client.user.id ||
(permissions.has(Permissions.FLAGS.MANAGE_MESSAGES, false) &&
this.guild.me.communicationDisabledUntilTimestamp < Date.now()),
this.guild.members.me.communicationDisabledUntilTimestamp < Date.now()),
);
}
@@ -1040,7 +1040,7 @@ class Message extends Base {
this.mentions.everyone ||
this.mentions.repliedUser?.id === this.client.user.id ||
this.mentions.users.has(this.client.user.id) ||
(this.guildId && this.mentions.roles.some(r => this.guild.me._roles?.includes(r.id)))
(this.guildId && this.mentions.roles.some(r => this.guild.members.me._roles?.includes(r.id)))
? 1
: 0,
},