refactor: Move me and add fetchMe() (fix)
This commit is contained in:
@@ -242,7 +242,7 @@ class Invite extends Base {
|
||||
get deletable() {
|
||||
const guild = this.guild;
|
||||
if (!guild || !this.client.guilds.cache.has(guild.id)) return false;
|
||||
if (!guild.me) throw new Error('GUILD_UNCACHED_ME');
|
||||
if (!guild.members.me) throw new Error('GUILD_UNCACHED_ME');
|
||||
return (
|
||||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false) ||
|
||||
guild.members.me.permissions.has(Permissions.FLAGS.MANAGE_GUILD)
|
||||
|
||||
Reference in New Issue
Block a user