C# Class Taikandi.Telebot.Telebot

Inheritance: IDisposable
ファイルを表示 Open project: mrtaikandi/Telebot

Public Methods

Method Description
AnswerCallbackQueryAsync ( [ callbackQueryId, string text = null, bool showAlert = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.

AnswerInlineQueryAsync ( [ inlineQueryId, [ results, int cacheTime = 300, bool isPersonal = false, string nextOffset = null, string switchPrivateMessageText = null, string switchPrivateMessageParameter = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends answers to an inline query.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DownloadFileAsync ( [ file, [ fullPath, bool overwrite = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Downloads the file requested by the GetFileAsync(string,System.Threading.CancellationToken) method.

DownloadFileAsync ( [ file, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Downloads the file requested by the GetFileAsync(string,System.Threading.CancellationToken) method.

EditMessageCaptionAsync ( [ inlineMessageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).

EditMessageCaptionAsync ( [ chatId, long messageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).

EditMessageCaptionAsync ( long chatId, long messageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).

EditMessageReplyMarkupAsync ( [ inlineMessageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).

EditMessageReplyMarkupAsync ( [ chatId, long messageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).

EditMessageReplyMarkupAsync ( long chatId, long messageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).

EditMessageTextAsync ( [ inlineMessageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits text messages sent by the bot or via the bot (for inline bots).

EditMessageTextAsync ( [ chatId, long messageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits text messages sent by the bot or via the bot (for inline bots).

EditMessageTextAsync ( long chatId, long messageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Edits text messages sent by the bot or via the bot (for inline bots).

ForwardMessageAsync ( [ chatId, string fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Forwards message of any kind.

ForwardMessageAsync ( long chatId, long fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Forwards message of any kind.

ForwardMessageAsync ( long chatId, string fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Forwards message of any kind.

GetFileAsync ( [ fileId, [ fullPath, bool overwrite = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Downloads the file with the specified fileId.

GetFileAsync ( [ fileId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Returns basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size.

GetMeAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

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.

GetUpdatesAsync ( long offset, int limit = 100, int timeout, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Use this method to receive incoming updates using long polling.

Note: In order to avoid getting duplicate updates, recalculate offset after each server response.

GetUserProfilePhotosAsync ( long userId, int offset = -1, int limit = 100, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Gets a list of profile pictures for a user.

KickChatMemberAsync ( [ chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Kicks a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first using UnbanChatMemberAsync(string, long, CancellationToken). The bot must be an administrator in the group for this to work.

Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.

KickChatMemberAsync ( long chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Kicks a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first using UnbanChatMemberAsync(string, long, CancellationToken). The bot must be an administrator in the group for this to work.

Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.

SendAudioAsync ( [ chatId, [ audioId, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.

SendAudioAsync ( [ chatId, [ audioStream, string fileName, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.

SendAudioAsync ( long chatId, [ audioId, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.

SendAudioAsync ( long chatId, [ audioStream, string fileName, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.

SendAudioFromFileAsync ( [ chatId, [ filePath, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

SendAudioFromFileAsync ( long chatId, [ filePath, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

SendChatActionAsync ( [ chatId, ChatAction action, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a chat action. Use this method when you need to tell the user that something is happening on the bot's side.

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use SendChatActionAsync(string,Taikandi.Telebot.Types.ChatAction,System.Threading.CancellationToken) with action = upload_photo. The user will see a "sending photo" status for the bot.

SendChatActionAsync ( long chatId, ChatAction action, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a chat action. Use this method when you need to tell the user that something is happening on the bot's side.

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use SendChatActionAsync(long,ChatAction,CancellationToken) with action = upload_photo. The user will see a "sending photo" status for the bot.

SendContactAsync ( [ chatId, [ phoneNumber, [ firstName, string lastName = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Send phone contacts.

SendContactAsync ( long chatId, [ phoneNumber, [ firstName, string lastName = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Send phone contacts.

SendDocumentAsync ( [ chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendDocumentAsync ( [ chatId, [ documentStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendDocumentAsync ( long chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendDocumentAsync ( long chatId, [ documentStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendDocumentFromFileAsync ( [ chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendDocumentFromFileAsync ( long chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a general file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendLocationAsync ( [ chatId, double latitude, double longitude, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a point on the map.

SendLocationAsync ( long chatId, double latitude, double longitude, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a point on the map.

SendMessageAsync ( [ message, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a text message and requests to hide the current custom keyboard by default. Optionally if the message is a reply, ID of the original message will be sent.

SendMessageAsync ( [ chatId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a text message.

SendMessageAsync ( long chatId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a text message.

SendPhotoAsync ( [ chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendPhotoAsync ( [ chatId, [ photoStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendPhotoAsync ( long chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendPhotoAsync ( long chatId, [ photoStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendPhotoFromFileAsync ( [ chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendPhotoFromFileAsync ( long chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a photo.

SendStickerAsync ( [ chatId, [ stickerId, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

SendStickerAsync ( [ chatId, [ stickerStream, string fileName, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

SendStickerAsync ( long chatId, [ stickerId, long replyToMessageId, bool disableNotification = false, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

SendStickerAsync ( long chatId, [ stickerStream, string fileName, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

SendStickerFromFileAsync ( [ chatId, [ filePath, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendStickerFromFileAsync ( long chatId, [ filePath, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends .webp sticker.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendVenueAsync ( [ chatId, float latitude, float longitude, [ title, [ address, string forsquareId = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Send information about a venue.

SendVenueAsync ( long chatId, float latitude, float longitude, [ title, [ address, string forsquareId = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Send information about a venue.

SendVideoAsync ( [ chatId, [ videoId, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

SendVideoAsync ( [ chatId, [ videoStream, string fileName, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

SendVideoAsync ( long chatId, [ videoId, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Telegram clients support mp4 videos (other formats may be sent as Types.Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

SendVideoAsync ( long chatId, [ videoStream, string fileName, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

SendVideoFromFileAsync ( [ chatId, [ filePath, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendVideoFromFileAsync ( long chatId, [ filePath, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends a video file.

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

SendVoiceAsync ( [ chatId, [ voice, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SendVoiceAsync ( [ chatId, [ voiceStream, string fileName, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SendVoiceAsync ( long chatId, [ voice, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SendVoiceAsync ( long chatId, [ voiceStream, string fileName, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SendVoiceFromFileAsync ( [ chatId, [ filePath, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SendVoiceFromFileAsync ( long chatId, [ filePath, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Sends an audio file to be displayed as a playable voice message on Telegram clients.

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

SetWebhookAsync ( string url, string certificatePath = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Use this method to specify a url and receive incoming updates via an outgoing webhook.

Whenever there is an update for the bot, Telegram will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, it will give up after a reasonable amount of attempts.

If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. www.example.com/YOUR_TOKEN. Since nobody else knows your bot's token, you can be pretty sure it’s Telegram.

You will not be able to receive updates using GetUpdatesAsync for as long as an outgoing webhook is set up. To use a self-signed certificate, you need to upload your public key certificate using certificatePath parameter. Ports currently supported for Webhooks: 443, 80, 88, 8443.
Telebot ( [ apiKey ) : System

Initializes a new instance of the Telebot class.

UnbanChatMemberAsync ( [ chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Unbans a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work.

UnbanChatMemberAsync ( long chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Unbans a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work.

Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.

Method Details

AnswerCallbackQueryAsync() public method

Sends answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
public AnswerCallbackQueryAsync ( [ callbackQueryId, string text = null, bool showAlert = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
callbackQueryId [ Unique identifier for the query to be answered.
text string /// Text of the notification. If not specified, nothing will be shown to the user. ///
showAlert bool /// If true, an alert will be shown by the client instead of a notification at the top of the /// chat screen. Defaults to false. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

AnswerInlineQueryAsync() public method

Sends answers to an inline query.
/// is null -or- is null. /// /// The nextOffset argument must be less than 64 bytes. /// No more than 50 results per query are allowed.
public AnswerInlineQueryAsync ( [ inlineQueryId, [ results, int cacheTime = 300, bool isPersonal = false, string nextOffset = null, string switchPrivateMessageText = null, string switchPrivateMessageParameter = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
inlineQueryId [ Unique identifier for answered query.
results [ Results of the inline query.
cacheTime int /// The maximum amount of time in seconds the result of the inline query may be cached on the Telegram /// server. Default is 300. ///
isPersonal bool /// true, to cache the results on the Telegram server only for the user that sent the query. By /// default, results may be returned to any user who sends the same query. ///
nextOffset string /// The offset that a client should send in the next query with the same text to receive more results. /// null or if there are no more results or if you don't support /// pagination. Offset length can't exceed 64 bytes. ///
switchPrivateMessageText string /// If passed, clients will display a button with specified text that switches the user to a private /// chat with the bot and sends the bot a start message with the parameter /// . ///
switchPrivateMessageParameter string /// Parameter for the start message sent to the bot when user presses the switch button. /// /// Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their /// YouTube account to adapt search results accordingly. To do this, it displays a ‘Connect your /// YouTube account’ button above the results, or even before showing any. The user presses the button, /// switches to a private chat with the bot and, in doing so, passes a start parameter that instructs /// the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the /// user can easily return to the chat where they wanted to use the bot's inline capabilities. /// ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

DownloadFileAsync() public method

Downloads the file requested by the GetFileAsync(string,System.Threading.CancellationToken) method.
/// File already exists in the destination path but overwrite parameter is set to false. /// file cannot be null | fullPath cannot be null.
public DownloadFileAsync ( [ file, [ fullPath, bool overwrite = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
file [ /// The file info received by calling /// . ///
fullPath [ /// The full directory and file name to the location where the downloaded file should be saved. ///
overwrite bool /// If set to true overwrites the file that exists in the path. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

DownloadFileAsync() public method

Downloads the file requested by the GetFileAsync(string,System.Threading.CancellationToken) method.
File cannot be null.
public DownloadFileAsync ( [ file, CancellationToken cancellationToken = default(CancellationToken) ) : Task
file [ /// The file info received by calling /// . ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

EditMessageCaptionAsync() public method

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).
public EditMessageCaptionAsync ( [ inlineMessageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
inlineMessageId [ Identifier of the inline message.
caption [ New caption of the message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageCaptionAsync() public method

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).
public EditMessageCaptionAsync ( [ chatId, long messageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
caption [ New caption of the message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageCaptionAsync() public method

Edits captions of the message with the provided identifier sent by the bot or via the bot (for inline bots).
public EditMessageCaptionAsync ( long chatId, long messageId, [ caption, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
caption [ New caption of the message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageReplyMarkupAsync() public method

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
public EditMessageReplyMarkupAsync ( [ inlineMessageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
inlineMessageId [ Identifier of the inline message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageReplyMarkupAsync() public method

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
public EditMessageReplyMarkupAsync ( [ chatId, long messageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageReplyMarkupAsync() public method

Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
public EditMessageReplyMarkupAsync ( long chatId, long messageId, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageTextAsync() public method

Edits text messages sent by the bot or via the bot (for inline bots).
public EditMessageTextAsync ( [ inlineMessageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
inlineMessageId [ The identifier of the inline message.
text [ New text of the message
parseMode ParseMode /// A value from enum indicates the way that the Telegram should parse the /// sent message. Send , if you want Telegram apps to show bold, /// italic, fixed-width text or inline URLs in your bot's message. ///
disableWebPagePreview bool Disables link previews for links in this message
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageTextAsync() public method

Edits text messages sent by the bot or via the bot (for inline bots).
public EditMessageTextAsync ( [ chatId, long messageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
text [ New text of the message
parseMode ParseMode /// A value from enum indicates the way that the Telegram should parse the /// sent message. Send , if you want Telegram apps to show bold, /// italic, fixed-width text or inline URLs in your bot's message. ///
disableWebPagePreview bool Disables link previews for links in this message
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

EditMessageTextAsync() public method

Edits text messages sent by the bot or via the bot (for inline bots).
public EditMessageTextAsync ( long chatId, long messageId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, InlineKeyboardMarkup replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername). ///
messageId long Unique identifier of the sent message.
text [ New text of the message
parseMode ParseMode /// A value from enum indicates the way that the Telegram should parse the /// sent message. Send , if you want Telegram apps to show bold, /// italic, fixed-width text or inline URLs in your bot's message. ///
disableWebPagePreview bool Disables link previews for links in this message
replyMarkup Taikandi.Telebot.Types.InlineKeyboardMarkup /// An object for a custom reply keyboard. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

ForwardMessageAsync() public method

Forwards message of any kind.
public ForwardMessageAsync ( [ chatId, string fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
fromChatId string Unique identifier for the chat where the original message was sent or username of the target /// channel (in the format @channelusername).
messageId long Unique message identifier
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

ForwardMessageAsync() public method

Forwards message of any kind.
public ForwardMessageAsync ( long chatId, long fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
fromChatId long /// Unique identifier for the chat where the original message was sent. ///
messageId long Unique message identifier
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

ForwardMessageAsync() public method

Forwards message of any kind.
public ForwardMessageAsync ( long chatId, string fromChatId, long messageId, bool disableNotification = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
fromChatId string /// Unique identifier for the chat where the original message was sent or username of the target /// channel (in the format @channelusername). ///
messageId long Unique message identifier
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

GetFileAsync() public method

Downloads the file with the specified fileId.
public GetFileAsync ( [ fileId, [ fullPath, bool overwrite = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
fileId [ The file identifier.
fullPath [ /// The full directory and file name to the location where the downloaded file should be saved. ///
overwrite bool /// If set to true overwrites the file that exists in the path. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

GetFileAsync() public method

Returns basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size.
public GetFileAsync ( [ fileId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
fileId [ The file identifier.
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

GetMeAsync() public method

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.
public GetMeAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

GetUpdatesAsync() public method

Use this method to receive incoming updates using long polling.

Note: In order to avoid getting duplicate updates, recalculate offset after each server response.

public GetUpdatesAsync ( long offset, int limit = 100, int timeout, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
offset long /// Identifier of the first update to be returned. Must be greater by one than the highest among the /// identifiers of previously received updates. By default, updates starting with the earliest /// unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called /// with an offset higher than its update_id. ///
limit int /// Limits the number of updates to be retrieved. Values between 1—100 are accepted. Defaults to 100. ///
timeout int /// Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task>

GetUserProfilePhotosAsync() public method

Gets a list of profile pictures for a user.
public GetUserProfilePhotosAsync ( long userId, int offset = -1, int limit = 100, CancellationToken cancellationToken = default(CancellationToken) ) : Task
userId long Unique identifier of the target user.
offset int /// Sequential number of the first photo to be returned. By default, all photos are returned. ///
limit int /// Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

KickChatMemberAsync() public method

Kicks a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first using UnbanChatMemberAsync(string, long, CancellationToken). The bot must be an administrator in the group for this to work.
Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.
chatId cannot be null. userId must be a number greater than zero.
public KickChatMemberAsync ( [ chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target group or username of the target supergroup (in the format /// @supergroupusername). ///
userId long Unique identifier of the target user.
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

KickChatMemberAsync() public method

Kicks a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first using UnbanChatMemberAsync(string, long, CancellationToken). The bot must be an administrator in the group for this to work.
Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.
chatId cannot be null. userId must be a number greater than zero.
public KickChatMemberAsync ( long chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the target group.
userId long Unique identifier of the target user.
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

SendAudioAsync() public method

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
public SendAudioAsync ( [ chatId, [ audioId, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
audioId [ Id of an audio file that is already on the Telegram servers.
duration int Duration of the audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendAudioAsync() public method

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
public SendAudioAsync ( [ chatId, [ audioStream, string fileName, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
audioStream [ A to the audio file to send.
fileName string A name for the file to be sent using .
duration int Duration of the audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendAudioAsync() public method

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
public SendAudioAsync ( long chatId, [ audioId, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
audioId [ Id of an audio file that is already on the Telegram servers.
duration int Duration of the audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendAudioAsync() public method

Sends an audio file. If you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
public SendAudioAsync ( long chatId, [ audioStream, string fileName, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
audioStream [ A to the audio file to send.
fileName string A name for the file to be sent using .
duration int Duration of the audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendAudioFromFileAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
public SendAudioFromFileAsync ( [ chatId, [ filePath, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the audio file.
duration int Duration of sent audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendAudioFromFileAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
public SendAudioFromFileAsync ( long chatId, [ filePath, int duration, string performer = null, string title = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
filePath [ Fully qualified path to the audio file.
duration int Duration of sent audio in seconds.
performer string The performer of the audio.
title string The track name.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendChatActionAsync() public method

Sends a chat action. Use this method when you need to tell the user that something is happening on the bot's side.
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use SendChatActionAsync(string,Taikandi.Telebot.Types.ChatAction,System.Threading.CancellationToken) with action = upload_photo. The user will see a "sending photo" status for the bot.
public SendChatActionAsync ( [ chatId, ChatAction action, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername). ///
action Taikandi.Telebot.Types.ChatAction Type of action to broadcast.
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

SendChatActionAsync() public method

Sends a chat action. Use this method when you need to tell the user that something is happening on the bot's side.
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use SendChatActionAsync(long,ChatAction,CancellationToken) with action = upload_photo. The user will see a "sending photo" status for the bot.
public SendChatActionAsync ( long chatId, ChatAction action, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
action Taikandi.Telebot.Types.ChatAction Type of action to broadcast.
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

SendContactAsync() public method

Send phone contacts.
/// chatId cannot be null -or- phoneNumber cannot be null -or- firstName cannot be null. ///
public SendContactAsync ( [ chatId, [ phoneNumber, [ firstName, string lastName = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername) ///
phoneNumber [ Contact's phone number.
firstName [ Contact's first name.
lastName string Contact's last name.
disableNotification bool /// If set to true sends the message silently. iOS users will not receive a notification, /// Android users will receive a notification with no sound. ///
replyToMessageId long /// If the message is a reply, ID of the original message. ///
replyMarkup IReply /// Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

SendContactAsync() public method

Send phone contacts.
/// chatId cannot be null -or- phoneNumber cannot be null -or- firstName cannot be null. ///
public SendContactAsync ( long chatId, [ phoneNumber, [ firstName, string lastName = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long /// Unique identifier for the target chat or username of the target channel (in the format /// @channelusername) ///
phoneNumber [ Contact's phone number.
firstName [ Contact's first name.
lastName string Contact's last name.
disableNotification bool /// If set to true sends the message silently. iOS users will not receive a notification, /// Android users will receive a notification with no sound. ///
replyToMessageId long /// If the message is a reply, ID of the original message. ///
replyMarkup IReply /// Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

SendDocumentAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentAsync ( [ chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
documentId [ A file id as string to resend a file that is already on the Telegram servers.
caption string The document caption, 0-200 characters.
disableNotification bool if set to true [disable notification].
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendDocumentAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentAsync ( [ chatId, [ documentStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
documentStream [ A to the document file to send.
fileName string A name for the file to be sent using .
caption string Document caption, 0-200 characters.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendDocumentAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentAsync ( long chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
documentId [ A file id as string to resend a file that is already on the Telegram servers.
caption string The document caption, 0-200 characters.
disableNotification bool if set to true [disable notification].
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendDocumentAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentAsync ( long chatId, [ documentStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
documentStream [ A to the document file to send.
fileName string A name for the file to be sent using .
caption string Document caption, 0-200 characters.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendDocumentFromFileAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentFromFileAsync ( [ chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the file to send.
caption string The document caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendDocumentFromFileAsync() public method

Sends a general file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendDocumentFromFileAsync ( long chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the file to send.
caption string The document caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendLocationAsync() public method

Sends a point on the map.
public SendLocationAsync ( [ chatId, double latitude, double longitude, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
latitude double Latitude of location
longitude double Longitude of location
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendLocationAsync() public method

Sends a point on the map.
public SendLocationAsync ( long chatId, double latitude, double longitude, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
latitude double Latitude of location
longitude double Longitude of location
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendMessageAsync() public method

Sends a text message and requests to hide the current custom keyboard by default. Optionally if the message is a reply, ID of the original message will be sent.
public SendMessageAsync ( [ message, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
message [ The original received message.
text [ Text of the message to be sent.
parseMode ParseMode Indicates the way that the Telegram should parse the sent message.
disableWebPagePreview bool if set to true disables link previews for links in this message.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user. Defaults to hide the current /// custom keyboard.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendMessageAsync() public method

Sends a text message.
public SendMessageAsync ( [ chatId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername). ///
text [ Text of the message to be sent.
parseMode ParseMode /// Indicates the way that the Telegram should parse the sent message. ///
disableWebPagePreview bool /// if set to true disables link previews for links in this message. ///
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long /// If the message is a reply, ID of the original message. ///
replyMarkup IReply /// Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

SendMessageAsync() public method

Sends a text message.
public SendMessageAsync ( long chatId, [ text, ParseMode parseMode = ParseMode.Normal, bool disableWebPagePreview = false, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
text [ Text of the message to be sent.
parseMode ParseMode Indicates the way that the Telegram should parse the sent message.
disableWebPagePreview bool if set to true disables link previews for links in this message.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoAsync() public method

Sends a photo.
public SendPhotoAsync ( [ chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
documentId [ A file id as string to resend a photo that is already on the Telegram servers.
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoAsync() public method

Sends a photo.
public SendPhotoAsync ( [ chatId, [ photoStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
photoStream [ A to the photo to upload.
fileName string A name for the file to be sent using .
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoAsync() public method

Sends a photo.
public SendPhotoAsync ( long chatId, [ documentId, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
documentId [ A file id as string to resend a photo that is already on the Telegram servers.
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoAsync() public method

Sends a photo.
public SendPhotoAsync ( long chatId, [ photoStream, string fileName, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
photoStream [ A to the photo to upload.
fileName string A name for the file to be sent using .
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoFromFileAsync() public method

Sends a photo.
public SendPhotoFromFileAsync ( [ chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ The fully qualified path to the photo to send.
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendPhotoFromFileAsync() public method

Sends a photo.
public SendPhotoFromFileAsync ( long chatId, [ filePath, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
filePath [ The fully qualified path to the photo to send.
caption string Photo caption (may also be used when resending photos by file id).
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerAsync() public method

Sends .webp sticker.
public SendStickerAsync ( [ chatId, [ stickerId, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
stickerId [ A file id as string to resend a sticker that is already on the Telegram servers.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerAsync() public method

Sends .webp sticker.
public SendStickerAsync ( [ chatId, [ stickerStream, string fileName, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
stickerStream [ A to the sticker file to send.
fileName string A name for the file to be sent using .
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerAsync() public method

Sends .webp sticker.
public SendStickerAsync ( long chatId, [ stickerId, long replyToMessageId, bool disableNotification = false, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
stickerId [ A file id as string to resend a sticker that is already on the Telegram servers.
replyToMessageId long If the message is a reply, ID of the original message.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerAsync() public method

Sends .webp sticker.
public SendStickerAsync ( long chatId, [ stickerStream, string fileName, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
stickerStream [ A to the sticker file to send.
fileName string A name for the file to be sent using .
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerFromFileAsync() public method

Sends .webp sticker.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendStickerFromFileAsync ( [ chatId, [ filePath, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the sticker to send.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendStickerFromFileAsync() public method

Sends .webp sticker.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendStickerFromFileAsync ( long chatId, [ filePath, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
filePath [ Fully qualified path to the sticker to send.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVenueAsync() public method

Send information about a venue.
chatId cannot be null -or- title cannot be null -or- address cannot be null.
public SendVenueAsync ( [ chatId, float latitude, float longitude, [ title, [ address, string forsquareId = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the target chat or username of the target channel (in the format /// @channelusername).
latitude float Latitude of the venue.
longitude float Longitude of the venue.
title [ Name of the venue.
address [ Address of the venue.
forsquareId string Foursquare identifier of the venue.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, /// Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A to observe while waiting for the task to /// complete.
return Task

SendVenueAsync() public method

Send information about a venue.
public SendVenueAsync ( long chatId, float latitude, float longitude, [ title, [ address, string forsquareId = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the target chat.
latitude float Latitude of the venue.
longitude float Longitude of the venue.
title [ Name of the venue.
address [ Address of the venue.
forsquareId string Foursquare identifier of the venue.
disableNotification bool /// If set to true sends the message silently. iOS users will not receive a notification, /// Android users will receive a notification with no sound. ///
replyToMessageId long /// If the message is a reply, ID of the original message. ///
replyMarkup IReply /// Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user. ///
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

SendVideoAsync() public method

Sends a video file.
Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
public SendVideoAsync ( [ chatId, [ videoId, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
videoId [ A file id as string to resend a video that is already on the Telegram servers.
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVideoAsync() public method

Sends a video file.
Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
public SendVideoAsync ( [ chatId, [ videoStream, string fileName, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
videoStream [ A to the video file to send.
fileName string A name for the file to be sent using .
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVideoAsync() public method

Sends a video file.
Telegram clients support mp4 videos (other formats may be sent as Types.Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
public SendVideoAsync ( long chatId, [ videoId, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
videoId [ A file id as string to resend a video that is already on the Telegram servers.
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVideoAsync() public method

Sends a video file.
Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
public SendVideoAsync ( long chatId, [ videoStream, string fileName, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
videoStream [ A to the video file to send.
fileName string A name for the file to be sent using .
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVideoFromFileAsync() public method

Sends a video file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendVideoFromFileAsync ( [ chatId, [ filePath, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the video file to send.
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVideoFromFileAsync() public method

Sends a video file.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public SendVideoFromFileAsync ( long chatId, [ filePath, int duration, string caption = null, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
filePath [ Fully qualified path to the video file to send.
duration int Duration of sent video in seconds.
caption string Video caption.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceAsync ( [ chatId, [ voice, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
voice [ Id of an audio file that is already on the Telegram servers to resend it.
duration int Duration of sent audio in seconds.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceAsync ( [ chatId, [ voiceStream, string fileName, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
voiceStream [ A to the audio file to send.
fileName string A name for the file to be sent using .
duration int Duration of sent audio in seconds
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceAsync ( long chatId, [ voice, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
voice [ Id of an audio file that is already on the Telegram servers to resend it.
duration int Duration of sent audio in seconds.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceAsync ( long chatId, [ voiceStream, string fileName, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
voiceStream [ A to the audio file to send.
fileName string A name for the file to be sent using .
duration int Duration of sent audio in seconds
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceFromFileAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceFromFileAsync ( [ chatId, [ filePath, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ Unique identifier for the message recipient or username of the target channel (in the format /// @channelusername).
filePath [ Fully qualified path to the audio file.
duration int Duration of sent audio in seconds.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SendVoiceFromFileAsync() public method

Sends an audio file to be displayed as a playable voice message on Telegram clients.
For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
public SendVoiceFromFileAsync ( long chatId, [ filePath, int duration, bool disableNotification = false, long replyToMessageId, IReply replyMarkup = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the message recipient.
filePath [ Fully qualified path to the audio file.
duration int Duration of sent audio in seconds.
disableNotification bool If set to true sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
replyToMessageId long If the message is a reply, ID of the original message.
replyMarkup IReply Additional interface options. An object for a custom reply keyboard, /// instructions to hide keyboard or to force a reply from the user.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of /// cancellation.
return Task

SetWebhookAsync() public method

Use this method to specify a url and receive incoming updates via an outgoing webhook.
Whenever there is an update for the bot, Telegram will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, it will give up after a reasonable amount of attempts.

If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. www.example.com/YOUR_TOKEN. Since nobody else knows your bot's token, you can be pretty sure it’s Telegram.

You will not be able to receive updates using GetUpdatesAsync for as long as an outgoing webhook is set up. To use a self-signed certificate, you need to upload your public key certificate using certificatePath parameter. Ports currently supported for Webhooks: 443, 80, 88, 8443.
public SetWebhookAsync ( string url, string certificatePath = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
url string /// HTTPS url to send updates to. Use an empty string to remove webhook integration ///
certificatePath string /// The fully qualified path to the certificate path so that the root certificate in use can be /// checked. ///
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of /// cancellation. ///
return Task

Telebot() public method

Initializes a new instance of the Telebot class.
public Telebot ( [ apiKey ) : System
apiKey [ Telegram API key.
return System

UnbanChatMemberAsync() public method

Unbans a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work.
chatId cannot be null. userId must be a number greater than zero.
public UnbanChatMemberAsync ( [ chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId [ /// Unique identifier for the target group or username of the target supergroup (in the format /// @supergroupusername). ///
userId long Unique identifier of the target user.
cancellationToken System.Threading.CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task

UnbanChatMemberAsync() public method

Unbans a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work.
Note: This will method only work if the ‘All Members Are Admins’ setting is off in the target group. Otherwise members may only be removed by the group's creator or by the member that added them.
chatId cannot be null. userId must be a number greater than zero.
public UnbanChatMemberAsync ( long chatId, long userId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
chatId long Unique identifier for the target group.
userId long Unique identifier of the target user.
cancellationToken CancellationToken /// A to observe while waiting for the task to /// complete. ///
return Task