public enum MessageType extends Enum<MessageType>
BotRequest.type() attribute
of the BotRequest annotation. All members of the enumeration correspond to the Update fields.BotRequest,
Update| Enum Constant and Description |
|---|
ANY
Used for all supported telegram requests.
|
CALLBACK_QUERY
Used when
Update.callbackQuery() is not null for the current telegram request. |
CHANNEL_POST
Used when
Update.channelPost() is not null for the current telegram request. |
CHOSEN_INLINE_RESULT
Used when
Update.chosenInlineResult() is not null for the current telegram request. |
EDITED_CHANNEL_POST
Used when
Update.editedChannelPost() is not null for the current telegram request. |
EDITED_MESSAGE
Used when
Update.editedMessage() is not null for the current telegram request. |
INLINE_QUERY
Used when
Update.inlineQuery() is not null for the current telegram request. |
MESSAGE
Used when
Update.message() is not null for the current telegram request. |
POLL
Used when
Update.poll() is not null for the current telegram request. |
PRECHECKOUT_QUERY
Used when
Update.preCheckoutQuery() is not null for the current telegram request. |
SHIPPING_QUERY
Used when
Update.shippingQuery() is not null for the current telegram request. |
UNSUPPORTED
For new types of telegram requests that are not yet supported.
|
| Modifier and Type | Method and Description |
|---|---|
static MessageType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MessageType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MessageType ANY
public static final MessageType MESSAGE
Update.message() is not null for the current telegram request.public static final MessageType EDITED_MESSAGE
Update.editedMessage() is not null for the current telegram request.public static final MessageType CHANNEL_POST
Update.channelPost() is not null for the current telegram request.public static final MessageType EDITED_CHANNEL_POST
Update.editedChannelPost() is not null for the current telegram request.public static final MessageType INLINE_QUERY
Update.inlineQuery() is not null for the current telegram request.public static final MessageType CHOSEN_INLINE_RESULT
Update.chosenInlineResult() is not null for the current telegram request.public static final MessageType CALLBACK_QUERY
Update.callbackQuery() is not null for the current telegram request.public static final MessageType SHIPPING_QUERY
Update.shippingQuery() is not null for the current telegram request.public static final MessageType PRECHECKOUT_QUERY
Update.preCheckoutQuery() is not null for the current telegram request.public static final MessageType POLL
Update.poll() is not null for the current telegram request.public static final MessageType UNSUPPORTED
public static MessageType[] values()
for (MessageType c : MessageType.values()) System.out.println(c);
public static MessageType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.