Method HasPermission
| Improve this Doc View SourceHasPermission(IDiscordGuildMember, DiscordPermission, DiscordGuild, DiscordGuildChannel?)
Returns whether this guild member has a set of permissions within the guild and optionally additionally within a specific guild channel.
Declaration
public static bool HasPermission(this IDiscordGuildMember member, DiscordPermission permissions, DiscordGuild guild, DiscordGuildChannel? channel = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordGuildMember | member | |
| DiscordPermission | permissions | The set of permissions to check if the member has. |
| DiscordGuild | guild | The guild this member is in. |
| DiscordGuildChannel | channel | A guild channel. If null, channel permissions will not be considered. |
Returns
| Type | Description |
|---|---|
| bool |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown if |
| ArgumentNullException | Thrown if |