Class Update
java.lang.Object
io.micronaut.chatbots.telegram.api.Update
Represents an incoming update.
At most one of the optional parameters can be present in any given update.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable CallbackQuery
@Nullable Message
@Nullable ChosenInlineResult
@Nullable Message
@Nullable Message
@Nullable InlineQuery
@Nullable Message
@Nullable Poll
getPoll()
@Nullable PollAnswer
@Nullable PreCheckoutQuery
@Nullable ShippingQuery
@NonNull Integer
void
setCallbackQuery
(@Nullable CallbackQuery callbackQuery) void
setChannelPost
(@Nullable Message channelPost) void
setChosenInlineResult
(@Nullable ChosenInlineResult chosenInlineResult) void
setEditedChannelPost
(@Nullable Message editedChannelPost) void
setEditedMessage
(@Nullable Message editedMessage) void
setInlineQuery
(@Nullable InlineQuery inlineQuery) void
setMessage
(@Nullable Message message) void
void
setPollAnswer
(@Nullable PollAnswer pollAnswer) void
setPreCheckoutQuery
(@Nullable PreCheckoutQuery preCheckoutQuery) void
setShippingQuery
(@Nullable ShippingQuery shippingQuery) void
setUpdateId
(@NonNull Integer updateId) toString()
-
Constructor Details
-
Update
public Update()
-
-
Method Details
-
getUpdateId
- Returns:
- The update‘s unique identifier.
-
setUpdateId
- Parameters:
updateId
- The update‘s unique identifier.
-
getMessage
- Returns:
- New incoming message of any kind — text, photo, sticker, etc.
-
setMessage
- Parameters:
message
- New incoming message of any kind — text, photo, sticker, etc.
-
getEditedMessage
- Returns:
- New version of a message that is known to the bot and was edited.
-
setEditedMessage
- Parameters:
editedMessage
- New version of a message that is known to the bot and was edited.
-
getChannelPost
- Returns:
- New incoming channel post of any kind — text, photo, sticker, etc.
-
setChannelPost
- Parameters:
channelPost
- New incoming channel post of any kind — text, photo, sticker, etc.
-
getEditedChannelPost
- Returns:
- New version of a channel post that is known to the bot and was edited.
-
setEditedChannelPost
- Parameters:
editedChannelPost
- New version of a channel post that is known to the bot and was edited.
-
getInlineQuery
- Returns:
- New incoming inline query.
-
setInlineQuery
- Parameters:
inlineQuery
- New incoming inline query.
-
getChosenInlineResult
- Returns:
- The result of an inline query that was chosen by a user and sent to their chat partner
-
setChosenInlineResult
- Parameters:
chosenInlineResult
- The result of an inline query that was chosen by a user and sent to their chat partner
-
getCallbackQuery
- Returns:
- New incoming callback query.
-
setCallbackQuery
- Parameters:
callbackQuery
- New incoming callback query.
-
getShippingQuery
- Returns:
- New incoming shipping query. Only for invoices with flexible price.
-
setShippingQuery
- Parameters:
shippingQuery
- New incoming shipping query. Only for invoices with flexible price.
-
getPreCheckoutQuery
- Returns:
- New incoming pre-checkout query. Contains full information about checkout.
-
setPreCheckoutQuery
- Parameters:
preCheckoutQuery
- New incoming pre-checkout query. Contains full information about checkout.
-
getPoll
- Returns:
- New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
-
setPoll
- Parameters:
poll
- New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
-
getPollAnswer
- Returns:
- A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
-
setPollAnswer
- Parameters:
pollAnswer
- A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
-
toString
-