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

The following examples show how to use net.dv8tion.jda.api.entities.Guild#NotificationLevel . 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 setDefaultNotificationLevel(@Nonnull Guild.NotificationLevel level)
{
    Checks.notNull(level, "Level");
    Checks.check(level != Guild.NotificationLevel.UNKNOWN, "Level must not be UNKNOWN");
    this.notificationLevel = level.getKey();
    set |= NOTIFICATION_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 setNotificationLevel(Guild.NotificationLevel level)
{
    this.notificationLevel = level;
    return this;
}
 
Example 3
Source File: GuildUpdateNotificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
public GuildUpdateNotificationLevelEvent(@Nonnull JDA api, long responseNumber, @Nonnull Guild guild, @Nonnull Guild.NotificationLevel oldNotificationLevel)
{
    super(api, responseNumber, guild, oldNotificationLevel, guild.getDefaultNotificationLevel(), IDENTIFIER);
}
 
Example 4
Source File: GuildUpdateNotificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The old {@link net.dv8tion.jda.api.entities.Guild.NotificationLevel NotificationLevel}
 *
 * @return The old NotificationLevel
 */
@Nonnull
public Guild.NotificationLevel getOldNotificationLevel()
{
    return getOldValue();
}
 
Example 5
Source File: GuildUpdateNotificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
/**
 * The new {@link net.dv8tion.jda.api.entities.Guild.NotificationLevel NotificationLevel}
 *
 * @return The new NotificationLevel
 */
@Nonnull
public Guild.NotificationLevel getNewNotificationLevel()
{
    return getNewValue();
}
 
Example 6
Source File: GuildUpdateNotificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.NotificationLevel getOldValue()
{
    return super.getOldValue();
}
 
Example 7
Source File: GuildUpdateNotificationLevelEvent.java    From JDA with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Guild.NotificationLevel getNewValue()
{
    return super.getNewValue();
}
 
Example 8
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.NotificationLevel Notification Level} of this {@link net.dv8tion.jda.api.entities.Guild Guild}.
 *
 * @param  level
 *         The new Notification 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 setDefaultNotificationLevel(@Nonnull Guild.NotificationLevel level);
 
Example 9
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.NotificationLevel NotificationLevel}
 * for the resulting {@link net.dv8tion.jda.api.entities.Guild Guild}
 *
 * @param  level
 *         The {@link net.dv8tion.jda.api.entities.Guild.NotificationLevel NotificationLevel} to use
 *
 * @return The current GuildAction for chaining convenience
 */
@Nonnull
@CheckReturnValue
GuildAction setNotificationLevel(@Nullable Guild.NotificationLevel level);