Java Code Examples for net.dv8tion.jda.api.entities.GuildChannel#getType()

The following examples show how to use net.dv8tion.jda.api.entities.GuildChannel#getType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InsufficientPermissionException.java    From JDA with Apache License 2.0 5 votes vote down vote up
private InsufficientPermissionException(@Nonnull Guild guild, @Nullable GuildChannel channel, @Nonnull Permission permission)
{
    super(permission, "Cannot perform action due to a lack of Permission. Missing permission: " + permission.toString());
    this.guildId = guild.getIdLong();
    this.channelId = channel == null ? 0 : channel.getIdLong();
    this.channelType = channel == null ? ChannelType.UNKNOWN : channel.getType();
}
 
Example 2
Source File: InsufficientPermissionException.java    From JDA with Apache License 2.0 5 votes vote down vote up
private InsufficientPermissionException(@Nonnull Guild guild, @Nullable GuildChannel channel, @Nonnull Permission permission, @Nonnull String reason)
{
    super(permission, reason);
    this.guildId = guild.getIdLong();
    this.channelId = channel == null ? 0 : channel.getIdLong();
    this.channelType = channel == null ? ChannelType.UNKNOWN : channel.getType();
}