Package org.javacord.api.entity.webhook
Enum WebhookType
- java.lang.Object
-
- java.lang.Enum<WebhookType>
-
- org.javacord.api.entity.webhook.WebhookType
-
- All Implemented Interfaces:
Serializable,Comparable<WebhookType>
public enum WebhookType extends Enum<WebhookType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHANNEL_FOLLOWERChannel follower webhooks are internal webhooks used with Channel Following to post new messages into channels.INCOMINGIncoming webhooks can post messages to channels with a generated token.UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebhookTypefromValue(int value)Gets anWebhookTypeby its value.intgetValue()Gets integer value that represents this type.static WebhookTypevalueOf(String name)Returns the enum constant of this type with the specified name.static WebhookType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INCOMING
public static final WebhookType INCOMING
Incoming webhooks can post messages to channels with a generated token. It extentsMessageable.
-
CHANNEL_FOLLOWER
public static final WebhookType CHANNEL_FOLLOWER
Channel follower webhooks are internal webhooks used with Channel Following to post new messages into channels.
-
UNKNOWN
public static final WebhookType UNKNOWN
-
-
Method Detail
-
values
public static WebhookType[] 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 (WebhookType c : WebhookType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WebhookType 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 integer value that represents this type.- Returns:
- The integer value that represents this type.
-
fromValue
public static WebhookType fromValue(int value)
Gets anWebhookTypeby its value.- Parameters:
value- The value of the webhook type.- Returns:
- The webhooktype for the given value,
or
UNKNOWNif there's none with the given value.
-
-