Package discord4j.core.object.entity
Enum Guild.NotificationLevel
- java.lang.Object
-
- java.lang.Enum<Guild.NotificationLevel>
-
- discord4j.core.object.entity.Guild.NotificationLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<Guild.NotificationLevel>
- Enclosing class:
- Guild
public static enum Guild.NotificationLevel extends Enum<Guild.NotificationLevel>
Determines whetherMembers
who have not explicitly set their notification settings receive a notification for every message sent in the server or not.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL_MESSAGES
Receive a notification for all messages.ONLY_MENTIONS
Receive a notification only for mentions.UNKNOWN
Unknown notification level.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Gets the underlying value as represented by Discord.static Guild.NotificationLevel
of(int value)
Gets the notification level of the guild.static Guild.NotificationLevel
valueOf(String name)
Returns the enum constant of this type with the specified name.static Guild.NotificationLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final Guild.NotificationLevel UNKNOWN
Unknown notification level.
-
ALL_MESSAGES
public static final Guild.NotificationLevel ALL_MESSAGES
Receive a notification for all messages.
-
ONLY_MENTIONS
public static final Guild.NotificationLevel ONLY_MENTIONS
Receive a notification only for mentions.
-
-
Method Detail
-
values
public static Guild.NotificationLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Guild.NotificationLevel c : Guild.NotificationLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Guild.NotificationLevel valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()
Gets the underlying value as represented by Discord.- Returns:
- The underlying value as represented by Discord.
-
of
public static Guild.NotificationLevel of(int value)
Gets the notification level of the guild. It is guaranteed that invokinggetValue()
from the returned enum will equal (==
) the suppliedvalue
.- Parameters:
value
- The underlying value as represented by Discord.- Returns:
- The notification level of the guild.
-
-