Java Code Examples for net.dv8tion.jda.api.entities.Guild#VerificationLevel

The following examples show how to use net.dv8tion.jda.api.entities.Guild#VerificationLevel . 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: GuildManagerImpl.java    From JDA with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
@CheckReturnValue
public GuildManagerImpl setVerificationLevel(@Nonnull Guild.VerificationLevel level)
{
    Checks.notNull(level, "Level");
    Checks.check(level != Guild.VerificationLevel.UNKNOWN, "Level must not be UNKNOWN");
    this.verificationLevel = level.getKey();
    set |= VERIFICATION_LEVEL;
    return this;
}
 
Example 2
Source File: GuildActionImpl.java    From JDA with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
@CheckReturnValue
public GuildActionImpl setVerificationLevel(Guild.VerificationLevel level)
{
    this.verificationLevel = level;
    return this;
}
 
Example 3
Source File: ServerInfoCommand.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
protected MessageEmbed.Field getVerificationLevel(Guild.VerificationLevel level) {
    return new MessageEmbed.Field(messageService.getMessage("discord.command.server.verificationLevel"),
            messageService.getEnumTitle(level), true);
}
 
Example 4
Source File: VerificationLevelException.java    From JDA with Apache License 2.0 4 votes vote down vote up
public VerificationLevelException(Guild.VerificationLevel level)
{
    super("Messages to this Guild can not be sent due to the Guilds verification level. (" + level.toString() + ')');
}
 
Example 5
Source File: GuildUpdateVerificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
public GuildUpdateVerificationLevelEvent(@Nonnull JDA api, long responseNumber, @Nonnull Guild guild, @Nonnull Guild.VerificationLevel oldVerificationLevel)
{
    super(api, responseNumber, guild, oldVerificationLevel, guild.getVerificationLevel(), IDENTIFIER);
}
 
Example 6
Source File: GuildUpdateVerificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The old {@link net.dv8tion.jda.api.entities.Guild.VerificationLevel VerificationLevel}
 *
 * @return The old VerificationLevel
 */
@Nonnull
public Guild.VerificationLevel getOldVerificationLevel()
{
    return getOldValue();
}
 
Example 7
Source File: GuildUpdateVerificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The new {@link net.dv8tion.jda.api.entities.Guild.VerificationLevel VerificationLevel}
 *
 * @return The new VerificationLevel
 */
@Nonnull
public Guild.VerificationLevel getNewVerificationLevel()
{
    return getNewValue();
}
 
Example 8
Source File: GuildUpdateVerificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.VerificationLevel getOldValue()
{
    return super.getOldValue();
}
 
Example 9
Source File: GuildUpdateVerificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.VerificationLevel getNewValue()
{
    return super.getNewValue();
}
 
Example 10
Source File: GuildManager.java    From JDA with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the {@link net.dv8tion.jda.api.entities.Guild.VerificationLevel Verification Level} of this {@link net.dv8tion.jda.api.entities.Guild Guild}.
 *
 * @param  level
 *         The new Verification Level for this {@link net.dv8tion.jda.api.entities.Guild Guild}
 *
 * @throws IllegalArgumentException
 *         If the provided level is {@code null} or UNKNOWN
 *
 * @return GuildManager for chaining convenience
 */
@Nonnull
@CheckReturnValue
GuildManager setVerificationLevel(@Nonnull Guild.VerificationLevel level);
 
Example 11
Source File: GuildAction.java    From JDA with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the {@link net.dv8tion.jda.api.entities.Guild.VerificationLevel VerificationLevel}
 * for the resulting {@link net.dv8tion.jda.api.entities.Guild Guild}
 *
 * @param  level
 *         The {@link net.dv8tion.jda.api.entities.Guild.VerificationLevel VerificationLevel} to use
 *
 * @return The current GuildAction for chaining convenience
 */
@Nonnull
@CheckReturnValue
GuildAction setVerificationLevel(@Nullable Guild.VerificationLevel level);