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

The following examples show how to use net.dv8tion.jda.api.entities.Guild#MFALevel . 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 setRequiredMFALevel(@Nonnull Guild.MFALevel level)
{
    Checks.notNull(level, "Level");
    Checks.check(level != Guild.MFALevel.UNKNOWN, "Level must not be UNKNOWN");
    this.mfaLevel = level.getKey();
    set |= MFA_LEVEL;
    return this;
}
 
Example 2
Source File: GuildUpdateMFALevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
public GuildUpdateMFALevelEvent(@Nonnull JDA api, long responseNumber, @Nonnull Guild guild, @Nonnull Guild.MFALevel oldMFALevel)
{
    super(api, responseNumber, guild, oldMFALevel, guild.getRequiredMFALevel(), IDENTIFIER);
}
 
Example 3
Source File: GuildUpdateMFALevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The old {@link net.dv8tion.jda.api.entities.Guild.MFALevel MFALevel}
 *
 * @return The old MFALevel
 */
@Nonnull
public Guild.MFALevel getOldMFALevel()
{
    return getOldValue();
}
 
Example 4
Source File: GuildUpdateMFALevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The new {@link net.dv8tion.jda.api.entities.Guild.MFALevel MFALevel}
 *
 * @return The new MFALevel
 */
@Nonnull
public Guild.MFALevel getNewMFALevel()
{
    return getNewValue();
}
 
Example 5
Source File: GuildUpdateMFALevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.MFALevel getOldValue()
{
    return super.getOldValue();
}
 
Example 6
Source File: GuildUpdateMFALevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.MFALevel getNewValue()
{
    return super.getNewValue();
}
 
Example 7
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.MFALevel MFA Level} of this {@link net.dv8tion.jda.api.entities.Guild Guild}.
 *
 * @param  level
 *         The new MFA 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 setRequiredMFALevel(@Nonnull Guild.MFALevel level);