TelegramEx class
Token is needed for some operations like file downloading, but original class save it to private variable, so we need this class only to make token accessible.
Constructors
- TelegramEx(String token)
Properties
Methods
-
addStickerToSet(
int user_id, String name, String emojis, {dynamic png_sticker, File? tgs_sticker, MaskPosition? mask_position}) → Future< bool> -
Use this method to add a new sticker to a set created by the bot
inherited
-
answerCallbackQuery(
String callback_query_id, {String? text, bool? show_alert, String? url, int? cache_time}) → Future< bool> -
Use this method to send answers to callback queries sent from inline keyboards
inherited
-
answerInlineQuery(
String inline_query_id, List< InlineQueryResult> results, {int? cache_time, bool? is_personal, String? next_offset, String? switch_pm_text, String? switch_pm_parameter}) → Future<bool> -
Use this method to send answers to an inline query
inherited
-
answerPreCheckoutQuery(
String pre_checkout_query_id, bool ok, {String? error_message}) → Future< bool> -
Use this method to respond to such pre-checkout queries
inherited
-
answerShippingQuery(
String shipping_query_id, bool ok, {List< ShippingOption> ? shipping_options, String? error_message}) → Future<bool> -
Use this method to reply to shipping queries.
inherited
-
banChatMember(
dynamic chat_id, int user_id, {int? until_date, bool? revoke_messages}) → Future< bool> -
Use this method to ban a user in a group, a supergroup or a channel
inherited
-
close(
) → Future< bool> -
Use this method to close the bot instance before moving it from one local server to another
inherited
-
copyMessage(
dynamic chat_id, int from_chat_id, int message_id, {String? parse_mode, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< MessageId> -
Use this method to copy messages of any kind
inherited
-
createChatInviteLink(
dynamic chat_id, {int? expire_date, int? member_limit}) → Future< ChatInviteLink> -
Use this method to create an additional invite link for a chat
inherited
-
createNewStickerSet(
int user_id, String name, String title, String emojis, {dynamic png_sticker, File? tgs_sticker, bool? contains_masks, MaskPosition? mask_position}) → Future< bool> -
Use this method to create sticker set owned by a user
inherited
-
deleteChatPhoto(
dynamic chat_id) → Future< bool> -
Use this method to delete a chat photo
inherited
-
deleteChatStickerSet(
dynamic chat_id) → Future< bool> -
Use this method to delete a group sticker set from a supergroup
inherited
-
deleteMessage(
dynamic chat_id, int message_id) → Future< bool> -
Use this method to delete a message, including service messages
inherited
-
deleteMyCommands(
{BotCommandScope? scope, String? language_code}) → Future< bool> -
Use this method to delete the list of the bot's commands for the given scope and user language
inherited
-
deleteStickerFromSet(
String sticker) → Future< bool> -
Use this method to delete a sticker from a set created by the bot
inherited
-
deleteWebhook(
{bool? drop_pending_updates}) → Future< bool> -
Use this method to remove webhook integration if you decide to switch back to getUpdates
inherited
-
editChatInviteLink(
dynamic chat_id, String invite_link, {int? expire_date, int? member_limit}) → Future< ChatInviteLink> -
Use this method to edit a non-primary invite link created by the bot
inherited
-
editMessageCaption(
{dynamic chat_id, int? message_id, String? inline_message_id, String? parse_mode, InlineKeyboardMarkup? reply_markup}) → Future< Message> -
Use this method to edit captions of messages sent by the bot or via the bot
(for inline bots).
inherited
-
editMessageLiveLocation(
double latitude, double longitude, {dynamic chat_id, int? message_id, String? inline_message_id, double? horizontal_accuracy, int? heading, int? proximity_alert_radius, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to edit live location messages sent by the bot or via the bot
(for inline bots).
inherited
-
editMessageMedia(
{dynamic chat_id, int? message_id, String? inline_message_id, InputMedia? media, String? parse_mode, InlineKeyboardMarkup? reply_markup}) → Future< Message> -
Use this method to edit audio, document, photo, or video messages
inherited
-
editMessageReplyMarkup(
{dynamic chat_id, int? message_id, String? inline_message_id, InlineKeyboardMarkup? reply_markup}) → Future< Message> -
Use this method to edit only the reply markup of messages sent by the bot or via the bot
(for inline bots).
inherited
-
editMessageText(
String text, {dynamic chat_id, int? message_id, String? inline_message_id, String? parse_mode, bool? disable_web_page_preview, InlineKeyboardMarkup? reply_markup}) → Future< Message> -
Use this method to edit text and
Game
messages sent by the bot or via the bot (for inline bots).inherited -
exportChatInviteLink(
dynamic chat_id) → Future< String> -
Use this method to generate a invite link for a chat
inherited
-
forwardMessage(
dynamic chat_id, int from_chat_id, int message_id, {bool? disable_notification}) → Future< Message> -
Use this method to forward messages of any kind. On success, the sent
Message
is returned.inherited -
getChat(
dynamic chat_id) → Future< Chat> -
Use this method to get up to date information about the chat
(current name of the user for one-on-one conversations,
current username of a user, group or channel, etc.).
inherited
-
getChatAdministrators(
dynamic chat_id) → Future< List< ChatMember> > -
Use this method to get a list of administrators in a chat
inherited
-
getChatMember(
dynamic chat_id, int user_id) → Future< ChatMember> -
Use this method to get information about a member of a chat
inherited
-
getChatMemberCount(
dynamic chat_id) → Future< int> -
Use this method to get the number of members in a chat
inherited
-
getFile(
String file_id) → Future< File> -
Use this method to get basic info about a file and prepare it for downloading
inherited
-
getGameHighScores(
int user_id, {dynamic chat_id, int? message_id, String? inline_message_id}) → Future< List< GameHighScore> > -
Use this method to get data for high score tables
inherited
-
getMe(
) → Future< User> -
A simple method for testing your bot's auth token.
Requires no parameters.
Returns basic information about the bot in form of a
User
object.inherited -
getMyCommands(
{BotCommandScope? scope, String? language_code}) → Future< List< BotCommand> > -
Use this method to get the current list of the bot's commands for the given scope and user language
inherited
-
getStickerSet(
String name) → Future< StickerSet> -
Use this method to get a sticker set
inherited
-
getUpdates(
{int? offset, int? limit, int? timeout, List< String> ? allowed_updates}) → Future<List< Update> > -
Use this method to receive incoming updates using long polling (wiki)
inherited
-
getUserProfilePhotos(
int user_id, {int? offset, int? limit}) → Future< UserProfilePhotos> -
Use this method to get a list of profile pictures for a user
inherited
-
getWebhookInfo(
) → Future< WebhookInfo> -
Use this method to get current webhook status.
Requires no parameters.
inherited
-
leaveChat(
dynamic chat_id) → Future< bool> -
Use this method for your bot to leave a group, supergroup or channel
inherited
-
logOut(
) → Future< bool> -
Use this method to log out from the cloud Bot API server before launching the bot locally
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinChatMessage(
dynamic chat_id, int message_id, {bool? disable_notification}) → Future< bool> -
Use this method to pin a message in a supergroup or a channel
inherited
-
promoteChatMember(
dynamic chat_id, int user_id, {bool? is_anonymous, bool? can_manage_chat, bool? can_post_messages, bool? can_edit_messages, bool? can_delete_messages, bool? can_manage_voice_chats, bool? can_restrict_members, bool? can_promote_members, bool? can_change_info, bool? can_invite_users, bool? can_pin_messages}) → Future< bool> -
Use this method to promote or demote a user in a supergroup or a channel
inherited
-
restrictChatMember(
dynamic chat_id, int user_id, {ChatPermissions? permissions, int? until_date}) → Future< bool> -
Use this method to restrict a user in a supergroup
inherited
-
revokeChatInviteLink(
dynamic chat_id, String invite_link) → Future< ChatInviteLink> -
Use this method to revoke an invite link created by the bot
inherited
-
sendAnimation(
dynamic chat_id, dynamic animation, {int? duration, int? width, int? height, dynamic thumb, String? parse_mode, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound)
inherited
-
sendAudio(
dynamic chat_id, dynamic audio, {String? parse_mode, int? duration, String? performer, String? title, dynamic thumb, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send audio files
inherited
-
sendChatAction(
dynamic chat_id, String action) → Future< bool> -
Use this method when you need to tell the user that something is happening on the bot's side
inherited
-
sendContact(
dynamic chat_id, String phone_number, String first_name, {String? last_name, String? vcard, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send phone contacts
inherited
-
sendDice(
dynamic chat_id, {String emoji = Dice.DICE, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send an animated emoji that will display a random value
inherited
-
sendDocument(
dynamic chat_id, dynamic document, {dynamic thumb, String? parse_mode, bool? disable_content_type_detection, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send general files
inherited
-
sendGame(
dynamic chat_id, String game_short_name, {bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, InlineKeyboardMarkup? reply_markup}) → Future< Message> -
Use this method to send a game
inherited
-
sendInvoice(
dynamic chat_id, String title, String description, String payload, String provider_token, String currency, List< LabeledPrice> prices, {int? max_tip_amount, List<int> ? suggested_tip_amounts, String? start_parameter, String? provider_data, String? photo_url, int? photo_size, int? photo_width, int? photo_height, bool? need_name, bool? need_phone_number, bool? need_email, bool? need_shipping_address, bool? send_phone_number_to_provider, bool? send_email_to_provider, bool? is_flexible, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, InlineKeyboardMarkup? reply_markup}) → Future<Message> -
Use this method to send invoices
inherited
-
sendLocation(
dynamic chat_id, double latitude, double longitude, {double? horizontal_accuracy, int? live_period, int? heading, int? proximity_alert_radius, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send point on the map
inherited
-
sendMediaGroup(
dynamic chat_id, List< InputMedia> media, {bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply}) → Future<List< Message> > -
Use this method to send a group of photos or videos as an album
inherited
-
sendMessage(
dynamic chat_id, String text, {String? parse_mode, List< MessageEntity> ? entities, bool? disable_web_page_preview, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future<Message> -
Use this method to send text messages. On success, the sent
Message
is returned.inherited -
sendPhoto(
dynamic chat_id, dynamic photo, {String? parse_mode, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send photos
inherited
-
sendPoll(
dynamic chat_id, String question, List< String> options, {bool? is_anonymous, String? type, bool? allows_multiple_answers, int? correct_option_id, String? explanation, String? explanation_parse_mode, List<MessageEntity> ? explanation_entities, int? open_period, int? close_date, bool? is_closed, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future<Message> -
Use this method to send a native poll
inherited
-
sendSticker(
dynamic chat_id, dynamic sticker, {bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send .webp stickers
inherited
-
sendVenue(
dynamic chat_id, double latitude, double longitude, String title, String address, {String? foursquare_id, String? foursquare_type, String? google_place_id, String? google_place_type, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send information about a venue
inherited
-
sendVideo(
dynamic chat_id, dynamic video, {int? duration, int? width, int? height, dynamic thumb, String? parse_mode, bool? supports_streaming, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send video files
inherited
-
sendVideoNote(
dynamic chat_id, dynamic video_note, {int? duration, int? length, dynamic thumb, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send video messages
inherited
-
sendVoice(
dynamic chat_id, dynamic voice, {String? parse_mode, int? duration, bool? disable_notification, int? reply_to_message_id, bool? allow_sending_without_reply, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to send audio files
inherited
-
setChatAdministratorCustomTitle(
dynamic chat_id, int user_id, String custom_title) → Future< bool> -
inherited
-
setChatDescription(
dynamic chat_id, {String? description}) → Future< bool> -
Use this method to change the description of a supergroup or a channel
inherited
-
setChatPermissions(
dynamic chat_id, ChatPermissions permissions) → Future< bool> -
Use this method to set default chat permissions for all members
inherited
-
setChatPhoto(
dynamic chat_id, File photo) → Future< bool> -
Use this method to set a profile photo for the chat
inherited
-
setChatStickerSet(
dynamic chat_id, String sticker_set_name) → Future< bool> -
Use this method to set a group sticker set for a supergroup
inherited
-
setChatTitle(
dynamic chat_id, String title) → Future< bool> -
Use this method to change the title of a chat
inherited
-
setGameScore(
int user_id, int score, {bool? force, bool? disable_edit_message, dynamic chat_id, int? message_id, String? inline_message_id}) → Future< Message> -
Use this method to set the score of the specified user in a game
inherited
-
setMyCommands(
List< BotCommand> commands, {BotCommandScope? scope, String? language_code}) → Future<bool> -
Use this method to change the list of the bot's commands
inherited
-
setPassportDataErrors(
int user_id, List< PassportElementError> errors) → Future<bool> -
Informs a user that some of the Telegram Passport elements they provided contains errors.
inherited
-
setStickerPositionInSet(
String sticker, int position) → Future< bool> -
Use this method to move a sticker in a set created by the bot to a specific position
inherited
-
setStickerSetThumb(
String name, int user_id, {dynamic thumb}) → Future< bool> -
Use this method to set the thumbnail of a sticker set
inherited
-
setWebhook(
String url, {String? ip_address, File? certificate, int? max_connections, List< String> ? allowed_updates, bool? drop_pending_updates}) → Future<bool> -
Use this method to specify a url and receive incoming updates via an outgoing webhook
inherited
-
stopMessageLiveLocation(
{dynamic chat_id, int? message_id, String? inline_message_id, ReplyMarkup? reply_markup}) → Future< Message> -
Use this method to stop updating a live location message sent by the bot or via the bot
(for inline bots) before live_period expires.
inherited
-
stopPoll(
dynamic chat_id, int message_id, InlineKeyboardMarkup reply_markup) → Future< Poll> -
Use this method to stop a poll which was sent by the bot
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unbanChatMember(
dynamic chat_id, int user_id, {bool? only_if_banned}) → Future< bool> -
Use this method to unban a previously kicked user in a supergroup or channel
inherited
-
unpinAllChatMessages(
dynamic chat_id) → Future< bool> -
Use this method to clear the list of pinned messages in a chat
inherited
-
unpinChatMessage(
dynamic chat_id, {int? message_id}) → Future< bool> -
Use this method to remove a message from the list of pinned messages in a chat
inherited
-
uploadStickerFile(
int user_id, File png_sticker) → Future< File> -
Use this method to upload a .png file with a sticker for later use in
createNewStickerSet and addStickerToSet methods (can be used multiple times)
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited