type property
UpdateType
get
type
Returns the type of the update.
Implementation
UpdateType get type {
if (message != null) {
return UpdateType.message;
} else if (editedMessage != null) {
return UpdateType.editedMessage;
} else if (channelPost != null) {
return UpdateType.channelPost;
} else if (editedChannelPost != null) {
return UpdateType.editedChannelPost;
} else if (inlineQuery != null) {
return UpdateType.inlineQuery;
} else if (chosenInlineResult != null) {
return UpdateType.chosenInlineResult;
} else if (callbackQuery != null) {
return UpdateType.callbackQuery;
} else if (shippingQuery != null) {
return UpdateType.shippingQuery;
} else if (preCheckoutQuery != null) {
return UpdateType.preCheckoutQuery;
} else if (poll != null) {
return UpdateType.poll;
} else if (pollAnswer != null) {
return UpdateType.pollAnswer;
} else if (myChatMember != null) {
return UpdateType.myChatMember;
} else if (chatMember != null) {
return UpdateType.chatMember;
} else if (chatJoinRequest != null) {
return UpdateType.chatJoinRequest;
} else if (messageReaction != null) {
return UpdateType.messageReaction;
} else if (messageReactionCount != null) {
return UpdateType.messageReactionCount;
} else if (chatBoost != null) {
return UpdateType.chatBoost;
} else if (removedChatBoost != null) {
return UpdateType.chatBoostRemoved;
} else if (businessConnection != null) {
return UpdateType.businessConnection;
} else if (businessMessage != null) {
return UpdateType.businessMessage;
} else if (editedBusinessMessage != null) {
return UpdateType.editedBusinessMessage;
} else if (deletedBusinessMessages != null) {
return UpdateType.deletedBusinessMessages;
} else if (purchasedPaidMedia != null) {
return UpdateType.purchasedPaidMedia;
} else {
throw TeleverseException(
"The update type is unknown",
description: "The given update does not match any known update type.",
type: TeleverseExceptionType.invalidParameter,
);
}
}