mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
GuildChannel.permissionsFor(role) (#2254)
* GuildChannel.permissionsFor(role) * 1Comp's requested changes
This commit is contained in:
@@ -295,9 +295,9 @@ class GuildMember extends Base {
|
||||
* @returns {?Permissions}
|
||||
*/
|
||||
permissionsIn(channel) {
|
||||
channel = this.client.channels.resolve(channel);
|
||||
if (!channel || !channel.guild) throw new Error('GUILD_CHANNEL_RESOLVE');
|
||||
return channel.permissionsFor(this);
|
||||
channel = this.guild.channels.resolve(channel);
|
||||
if (!channel) throw new Error('GUILD_CHANNEL_RESOLVE');
|
||||
return channel.memberPermissions(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user