Context class
The context object that is passed to all middleware and handlers.
The Context class provides convenient access to the current update and offers shortcuts for common bot operations like replying to messages, answering callback queries, and more.
You can extend this class to create custom context types with additional properties and methods specific to your bot's needs.
Example:
class MyContext extends Context {
MyContext(super.update, super.api, super.me);
String get userName => from?.firstName ?? 'Unknown';
bool get isPrivateChat => chat?.type == ChatType.private;
}
- Implementers
- Available extensions
Properties
- api → RawAPI
-
The RawAPI instance for making Telegram Bot API calls.
final
-
args
→ List<
String> -
Gets the arguments from a command message, if any.
no setter
- argsString → String?
-
Gets the full argument string from a command message.
no setter
- businessConnection → BusinessConnection?
-
The business connection from the update, if any.
no setter
- businessMessage → Message?
-
The business message from the update, if any.
no setter
- callbackQuery → CallbackQuery?
-
The callback query from the update, if any.
no setter
- caption → String?
-
The caption of the message, if any.
no setter
-
captionEntities
→ List<
MessageEntity> ? -
The caption entities, if any.
no setter
- channelPost → Message?
-
The channel post from the update, if any.
no setter
- chat → Chat?
-
The chat where the message was sent.
no setter
- chatBoost → ChatBoostUpdated?
-
The chat boost from the update, if any.
no setter
- chatJoinRequest → ChatJoinRequest?
-
The chat join request from the update, if any.
no setter
- chatMember → ChatMemberUpdated?
-
The chat member update from the update, if any.
no setter
- chosenInlineResult → ChosenInlineResult?
-
The chosen inline result from the update, if any.
no setter
- command → String?
-
Gets the command from the message, if any.
no setter
- conversation → ConversationContextOperations
-
Available on Context, provided by the ConversationContextGetter extension
Gets conversation operations for this context.no setter - deletedBusinessMessages → BusinessMessagesDeleted?
-
The deleted business messages from the update, if any.
no setter
- editedBusinessMessage → Message?
-
The edited business message from the update, if any.
no setter
- editedChannelPost → Message?
-
The edited channel post from the update, if any.
no setter
- editedMessage → Message?
-
The edited message from the update, if any.
no setter
-
entities
→ List<
MessageEntity> ? -
The message entities, if any.
no setter
- from → User?
-
The user who sent the message or performed the action.
no setter
- hasCommand → bool
-
Checks if the current update contains a command.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → ChatID
-
The Chat ID quick getter.
no setter
- inlineQuery → InlineQuery?
-
The inline query from the update, if any.
no setter
- isChannelPost → bool
-
Checks if the current update is from a channel.
no setter
- isGroupChat → bool
-
Checks if the current update is from a group chat.
no setter
- isPrivateChat → bool
-
Checks if the current update is from a private chat.
no setter
-
matches
→ List<
RegExpMatch> -
Regular expression matches found in the current update.
no setter
- me → BotInfo
-
Information about the bot.
final
- message → Message?
-
The message from the update, if any.
no setter
- messageId → int?
-
Gets the message ID from the current update.
no setter
- messageReaction → MessageReactionUpdated?
-
The message reaction from the update, if any.
no setter
- messageReactionCount → MessageReactionCountUpdated?
-
The message reaction count from the update, if any.
no setter
- msg → Message?
-
The effective message from the update.
no setter
- myChatMember → ChatMemberUpdated?
-
The my chat member update from the update, if any.
no setter
- poll → Poll?
-
The poll from the update, if any.
no setter
- pollAnswer → PollAnswer?
-
The poll answer from the update, if any.
no setter
- preCheckoutQuery → PreCheckoutQuery?
-
The pre-checkout query from the update, if any.
no setter
-
propertyKeys
→ Iterable<
String> -
Gets all property keys.
no setter
- purchasedPaidMedia → PaidMediaPurchased?
-
The purchased paid media from the update, if any.
no setter
- removedChatBoost → ChatBoostRemoved?
-
The removed chat boost from the update, if any.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shippingQuery → ShippingQuery?
-
The shipping query from the update, if any.
no setter
- text → String?
-
The text content of the message, if any.
no setter
- update → Update
-
The current update being processed.
final
Methods
-
answerCallbackQuery(
{String? text, bool showAlert = false, String? url, int cacheTime = 0}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Answers the callback query in the current update. -
answerInlineQuery(
List< InlineQueryResult> results, {int? cacheTime, bool? isPersonal, String? nextOffset, InlineQueryResultsButton? button}) → Future<bool> -
Available on Context, provided by the ContextAwareMethods extension
Answers the inline query in the current update. -
banAuthor(
{DateTime? untilDate, bool? revokeMessages}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Bans the author of the message -
banChatMember(
int userId, {DateTime? untilDate, bool? revokeMessages}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Bans a user from the current chat. -
clearCache(
) → void - Clears all cached values.
-
clearProperties(
) → void - Clears all properties.
-
copyHere(
{int? messageThreadId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, bool? showCaptionAboveMedia, bool? allowPaidBroadcast, int? videoStartTimestamp, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<MessageId> -
Available on Context, provided by the ContextAwareMethods extension
Copies the current message to the same chat with modifications. -
copyMessage(
ID toChatId, {int? messageThreadId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, bool? showCaptionAboveMedia, bool? allowPaidBroadcast, int? videoStartTimestamp, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<MessageId> -
Available on Context, provided by the ContextAwareMethods extension
Copies the current message to another chat. -
deleteMessage(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Deletes the current message. -
editInlineMessageCaption(
{String? businessConnectionId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? showCaptionAboveMedia, InlineKeyboardMarkup? replyMarkup}) → Future<bool> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current inline message's caption (from chosen inline result or callback query). -
editInlineMessageMedia(
InputMedia media, {String? businessConnectionId, InlineKeyboardMarkup? replyMarkup}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current inline message's media (from chosen inline result or callback query). -
editInlineMessageReplyMarkup(
{InlineKeyboardMarkup? replyMarkup, String? businessConnectionId}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current inline messages's reply markup. -
editInlineMessageText(
String text, {String? businessConnectionId, ParseMode? parseMode, List< MessageEntity> ? entities, LinkPreviewOptions? linkPreviewOptions, InlineKeyboardMarkup? replyMarkup}) → Future<bool> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current inline message's text (from chosen inline result or callback query). -
editMessageCaption(
{String? businessConnectionId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? showCaptionAboveMedia, InlineKeyboardMarkup? replyMarkup}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current message's caption. -
editMessageMedia(
InputMedia media, {String? businessConnectionId, InlineKeyboardMarkup? replyMarkup}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current message's media. -
editMessageReplyMarkup(
{InlineKeyboardMarkup? replyMarkup, String? businessConnectionId}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current message's reply markup. -
editMessageText(
String text, {String? businessConnectionId, ParseMode? parseMode, List< MessageEntity> ? entities, LinkPreviewOptions? linkPreviewOptions, InlineKeyboardMarkup? replyMarkup}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Edits the current message's text. -
enterConversation(
String conversationName) → Future< void> -
Available on Context, provided by the ConversationContextExtension extension
Enters a conversation by name. -
forwardHere(
{bool? disableNotification, int? messageThreadId, bool? protectContent, int? videoStartTimestamp, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Forwards the current message to the same chat (useful for highlighting). -
forwardMessage(
ID toChatId, {bool? disableNotification, int? messageThreadId, bool? protectContent, int? videoStartTimestamp, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Forwards the current message to another chat. -
get<
T> (String key) → T? - Gets a property value by key.
-
getAllCommands(
) → List< String> -
Available on Context, provided by the ContextEntityExtension extension
Gets all commands from the message. -
getAllEntitiesWithText(
) → Map< MessageEntityType, List< String> > -
Available on Context, provided by the ContextEntityExtension extension
Gets all entities with their corresponding text content. -
getAllEntityTexts(
MessageEntityType type) → List< String> -
Available on Context, provided by the ContextEntityExtension extension
Extracts text for all entities of the specified type. -
getBusinessConnectionId(
) → String? - Business Connection ID
-
getChat(
) → Future< ChatFullInfo> -
Available on Context, provided by the ContextAwareMethods extension
Gets information about the current chat. -
getChatAdministrators(
) → Future< List< ChatMember> > -
Available on Context, provided by the ContextAwareMethods extension
Gets the list of administrators in the current chat. -
getChatMember(
int userId) → Future< ChatMember> -
Available on Context, provided by the ContextAwareMethods extension
Gets information about a specific chat member. -
getChatMemberCount(
) → Future< int> -
Available on Context, provided by the ContextAwareMethods extension
Gets the member count of the current chat. -
getCommand(
) → String? -
Available on Context, provided by the ContextEntityExtension extension
Gets the first command from the message (if any). -
getEffectiveChatId(
) → ID? -
Available on Context, provided by the ContextAwareMethods extension
Gets the effective chat ID in the correct ID format. -
getEffectiveUserId(
) → int? -
Available on Context, provided by the ContextAwareMethods extension
Gets the effective user ID (from callback query, inline query, or message). -
getEntitiesOfType(
MessageEntityType type) → List< MessageEntity> -
Available on Context, provided by the ContextAwareMethods extension
Gets all entities of a specific type from the message. -
getEntityText(
MessageEntityType type) → String? -
Available on Context, provided by the ContextEntityExtension extension
Extracts text for entities of the specified type from the current message. -
Available on Context, provided by the ContextEntityExtension extension
Gets all hashtags from the message. -
getMentions(
) → List< String> -
Available on Context, provided by the ContextEntityExtension extension
Gets all mentions from the message. -
getMessageFile(
) → Future< File?> -
Available on Context, provided by the ContextAwareMethods extension
Gets file information for a file in the current message. -
getRawText(
) → String? -
Available on Context, provided by the ContextEntityExtension extension
Gets the raw text content without any entity processing. -
getReplyToMessage(
) → Message? -
Available on Context, provided by the ContextAwareMethods extension
Gets the message being replied to, if any. -
getThreadId(
) → int? - The message thread id, if the message is in a forum topic
-
getUrls(
) → List< String> -
Available on Context, provided by the ContextEntityExtension extension
Gets all URLs from the message. -
getUserDisplayName(
) → String -
Available on Context, provided by the ContextAwareMethods extension
Gets the display name for the user (first name + last name or username). -
getUserProfilePhotos(
{int? offset, int? limit}) → Future< UserProfilePhotos> -
Available on Context, provided by the ContextAwareMethods extension
Gets profile photos for the user who sent the current message. -
has(
String key) → bool - Checks if a property exists.
-
hasEntities(
) → bool -
Available on Context, provided by the ContextEntityExtension extension
Checks if the message contains any entities. -
hasEntity(
MessageEntityType type) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the message contains any entities of a specific type. -
hasEntityType(
MessageEntityType type) → bool -
Available on Context, provided by the ContextEntityExtension extension
Checks if the message contains entities of the specified type. -
hasMedia(
) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the message has any media content. -
hasText(
String text, {bool caseSensitive = false}) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the message contains a specific text. -
hasUsername(
String username) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the user has a specific username. -
isFromBot(
) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the current user is a bot admin (user ID matches bot ID). -
isFromChat(
ChatID chatId) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the current chat is a specific chat. -
isFromUser(
int userId) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the current user is the sender of the message. -
isInlineMessage(
) → bool - Whether the message is an inline message
-
isReply(
) → bool -
Available on Context, provided by the ContextAwareMethods extension
Checks if the message is a reply to another message. -
isServiceMessage(
) → bool - Determine whether the update is a service message
-
kickChatMember(
int userId, {bool? revokeMessages}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Kicks a user from the current chat. -
leaveChat(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Leaves the current chat. -
muteChatMember(
int userId, {DateTime? untilDate, bool allowMedia = false, bool allowOther = false}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Mutes a user in the current chat by restricting their ability to send messages. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinMessage(
{bool? disableNotification}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Pins the current message in the chat. -
promoteAuthor(
{bool? isAnonymous, bool? canManageChat, bool? canPostMessages, bool? canEditMessages, bool? canDeleteMessages, bool? canManageVideoChats, bool? canRestrictMembers, bool? canPromoteMembers, bool? canChangeInfo, bool? canInviteUsers, bool? canPinMessages, bool? canManageTopics, bool? canPostStories, bool? canEditStories, bool? canDeleteStories, bool? canManageDirectMessages}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes the author of the message to administrator in the current chat. -
promoteAuthorToContentManager(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes the author to content manager with content-related permissions. -
promoteAuthorToFullAdmin(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes the author to full administrator with all permissions. -
promoteAuthorToModerator(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes the author to moderator with common moderation permissions. -
promoteChatMember(
int userId, {bool? isAnonymous, bool? canManageChat, bool? canPostMessages, bool? canEditMessages, bool? canDeleteMessages, bool? canManageVideoChats, bool? canRestrictMembers, bool? canPromoteMembers, bool? canChangeInfo, bool? canInviteUsers, bool? canPinMessages, bool? canManageTopics, bool? canPostStories, bool? canEditStories, bool? canDeleteStories, bool? canManageDirectMessages}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes a user to administrator in the current chat. -
promoteToContentManager(
int userId) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes a user to content manager with content-related permissions. -
promoteToFullAdmin(
int userId) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes a user to full administrator with all permissions. -
promoteToModerator(
int userId) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Promotes a user to moderator with common moderation permissions. -
react(
String reaction, {bool? isBig}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Sets a normal reaction on the current message. -
reactWithFire(
{bool? isBig}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Adds a fire reaction to the current message. -
reactWithHeart(
{bool? isBig}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Adds a heart reaction to the current message. -
reactWithThumbsUp(
{bool? isBig}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Adds a thumbs up reaction to the current message. -
readBusinessMessage(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Reads the current business message. -
remove<
T> (String key) → T? - Removes a property and returns its value.
-
removeKeyboard(
) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Removes the current message's keyboard. -
removeReactions(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Removes all reactions from the current message. -
reply(
String text, {int? messageThreadId, ParseMode? parseMode, List< MessageEntity> ? entities, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, LinkPreviewOptions? linkPreviewOptions, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Replies to the current message with text. -
replyWithAnimation(
InputFile animation, {int? messageThreadId, int? duration, int? width, int? height, InputFile? thumbnail, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? hasSpoiler, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? showCaptionAboveMedia, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends an animation (GIF or H.264/MPEG-4 AVC video without sound) to the current chat. -
replyWithAudio(
InputFile audio, {int? messageThreadId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, int? duration, String? performer, String? title, InputFile? thumbnail, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends an audio file to the current chat. -
replyWithContact(
String phoneNumber, String firstName, {int? messageThreadId, String? lastName, String? vcard, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends contact information to the current chat. -
replyWithDice(
{DiceEmoji emoji = DiceEmoji.dice, int? messageThreadId, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a dice animation to the current chat. -
replyWithDocument(
InputFile document, {int? messageThreadId, InputFile? thumbnail, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? disableContentTypeDetection, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a document to the current chat. -
replyWithLocation(
double latitude, double longitude, {int? messageThreadId, double? horizontalAccuracy, int? livePeriod, int? heading, int? proximityAlertRadius, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a location to the current chat. -
replyWithMediaGroup(
List< InputMedia> media, {int? messageThreadId, bool? disableNotification, bool? protectContent, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId}) → Future<List< Message> > -
Available on Context, provided by the ContextAwareMethods extension
Sends a media group (2-10 items) to the current chat. -
replyWithPhoto(
InputFile photo, {int? messageThreadId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, bool? hasSpoiler, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? showCaptionAboveMedia, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Replies to the current message with a photo. -
replyWithPoll(
String question, List< InputPollOption> options, {int? messageThreadId, bool? isAnonymous, PollType type = PollType.regular, bool? allowsMultipleAnswers, int? correctOptionId, String? explanation, ParseMode? explanationParseMode, List<MessageEntity> ? explanationEntities, int? openPeriod, DateTime? closeDate, bool? isClosed, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, ParseMode? questionParseMode, List<MessageEntity> ? questionEntities, String? messageEffectId, bool? allowPaidBroadcast}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a poll to the current chat. -
replyWithSticker(
InputFile sticker, {String? businessConnectionId, int? messageThreadId, String? emoji, bool? disableNotification, bool? protectContent, bool? allowPaidBroadcast, String? messageEffectId, ReplyParameters? replyParameters, ReplyMarkup? replyMarkup, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a sticker to the current chat. -
replyWithVenue(
double latitude, double longitude, String title, String address, {int? messageThreadId, String? foursquareId, String? foursquareType, String? googlePlaceId, String? googlePlaceType, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends venue information to the current chat. -
replyWithVideo(
InputFile video, {int? messageThreadId, int? duration, int? width, int? height, InputFile? thumbnail, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, bool? hasSpoiler, bool? supportsStreaming, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? showCaptionAboveMedia, bool? allowPaidBroadcast, InputFile? cover, int? startTimestamp, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a video to the current chat. -
replyWithVideoNote(
InputFile videoNote, {int? messageThreadId, int? duration, int? length, InputFile? thumbnail, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future< Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a video note (rounded square MPEG4 video) to the current chat. -
replyWithVoice(
InputFile voice, {int? messageThreadId, String? caption, ParseMode? parseMode, List< MessageEntity> ? captionEntities, int? duration, bool? disableNotification, bool? protectContent, ReplyMarkup? replyMarkup, ReplyParameters? replyParameters, String? businessConnectionId, String? messageEffectId, bool? allowPaidBroadcast, int? directMessagesTopicId, SuggestedPostParameters? suggestedPostParameters}) → Future<Message> -
Available on Context, provided by the ContextAwareMethods extension
Sends a voice message to the current chat. -
restrictChatMember(
int userId, ChatPermissions permissions, {DateTime? untilDate, bool? useIndependentChatPermissions}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Restricts a user in the current chat. -
sendChatAction(
ChatAction action, {int? messageThreadId, String? businessConnectionId}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Sends a chat action to the current chat. -
sendTyping(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Sends "typing" action to the current chat. -
sendUploadDocument(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Sends "upload document" action to the current chat. -
sendUploadPhoto(
) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Sends "upload photo" action to the current chat. -
set<
T> (String key, T value) → void - Sets a property value by key.
-
setReaction(
List< ReactionType> ? reaction, {bool? isBig}) → Future<bool> -
Available on Context, provided by the ContextAwareMethods extension
Sets a reaction on the current message. -
toString(
) → String -
A string representation of this object.
override
-
unbanChatMember(
int userId, {bool? onlyIfBanned}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Unbans a previously banned user in the current chat. -
unmuteChatMember(
int userId) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Unmutes a user in the current chat by restoring their default permissions. -
unpinMessage(
{String? businessConnectionId}) → Future< bool> -
Available on Context, provided by the ContextAwareMethods extension
Unpins the current message in the chat. -
withTyping<
T> (Future< T> operation()) → Future<T> -
Available on Context, provided by the ContextAwareMethods extension
Shows typing indicator and executes a function. -
withUploadDocument<
T> (Future< T> operation()) → Future<T> -
Available on Context, provided by the ContextAwareMethods extension
Shows upload document indicator and executes a function. -
withUploadPhoto<
T> (Future< T> operation()) → Future<T> -
Available on Context, provided by the ContextAwareMethods extension
Shows upload photo indicator and executes a function.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited