telegrambots / telegram.bot.examples Goto Github PK
View Code? Open in Web Editor NEWExamples for the Telegram.Bot C# Library
License: MIT License
Examples for the Telegram.Bot C# Library
License: MIT License
Please add an example for InlineKeyboardButton.SwitchInlineQuery Property.
TODO (optional): Describe a specific scenario you would like to see addressed.
Please add an example for TelegramBotClient.SendDocumentAsync Method (Int64, FileToSend, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendDocumentAsync_1.htm
Please add an example for InlineKeyboardButton.SwitchInlineQuery Property.
TODO (optional): Describe a specific scenario you would like to see addressed.
Please add an example for TelegramBotClient.SendAudioAsync Method (Int64, FileToSend, Int32, String, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendAudioAsync_1.htm
Please add an example for TelegramBotClient.GetFileAsync Method.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_GetFileAsync.htm
I have one application in which i need to send approx. 30000 Msg/hr. [text + image]. How can i achieve this?
If you're sending bulk notifications to multiple users, the API will not allow more than 30 messages per second or so.
Currently I am sending message one by one. so it take 1 min to send 20 to 25 message [text+image]. As per telegram we can send 30 msg per second to different user. I want to achieve this limit without blocking bot.
Thanks.
Please add an example for TelegramBotClient.SendContactAsync Method (Int64, String, String, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendContactAsync.htm
Please add an example for TelegramBotClient.OnInlineQuery Event.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/E_Telegram_Bot_TelegramBotClient_OnInlineQuery.htm
Please update to include an example (or two) with inline mode in mind.
Please add an example for Update Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_Update.htm
hello could someone explain to me how to settup the webhook?
because the example isn't very clear to me.
everthing without the webhook works fine though.
thanks in advance
Good evening, while I apologize for having created a double discussion.
I can not create a check for spam in my bot!
I would like some advice, or a code.
Thank you and I apologize again!
Sorry for my English!
Hi
When does the method BotOnInlineQueryReceived called?
I tried all kind of playing with Telegram but it never got called.
Thanks
Please add an example for TelegramBotClient.SendDocumentAsync Method (Int64, FileToSend, String, Boolean, Int32, IReplyMarkup, CancellationToken).
I can't send a file with this code and I don't know why
using (FileStream fs = file.OpenRead())
{
Telegram.Bot.Types.FileToSend Telegramfile = new Telegram.Bot.Types.FileToSend("log.txt", fs);
var sendtask = client.SendDocumentAsync(controlador.TelegramID, Telegramfile);
}
Thanks
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendDocumentAsync_1.htm
Please add an example for TelegramBotClient.SendDocumentAsync Method (Int64, String, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendDocumentAsync.htm
Where and how to host my c# server side console application.
Is there any good documentation or example for doing that?
Please add an example for TelegramBotClient.EditInlineMessageTextAsync Method.
TODO (optional): Describe a specific scenario you would like to see addressed.
Hi. When I set webhook url, how can I receive and decode incoming json message?
Tnq
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SetWebhookAsync.htm
Please add an example for TelegramBotClient.AnswerInlineQueryAsync Method.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_AnswerInlineQueryAsync.htm
Please add an example for Message.ChannelChatCreated Property.
TODO (optional): I want to capture a channel ID to keep a list of channels to send messages to, from the bot.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/P_Telegram_Bot_Types_Message_ChannelChatCreated.htm
Please add an example for Video Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_Video.htm
Please add an example for InlineQuery Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_InlineQuery.htm
Please add an example for TelegramBotClient.OnMessage Event.
i'm trying to forward a message from a group to other one
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/E_Telegram_Bot_TelegramBotClient_OnMessage.htm
I want to use keyboard to get the selected option. How to get the selected option ? Any example?
my question is answered by "node-telegram-bot-api" here:
yagop/node-telegram-bot-api#108
Please add an example for ITelegramBotClient.EditInlineMessageReplyMarkupAsync Method.
TODO (optional): Describe a specific scenario you would like to see addressed.
Please add an example for InlineKeyboardMarkup Constructor (InlineKeyboardButton[][]).
TODO (optional): Describe a specific scenario you would like to see addressed.
Please add an example for ReplyKeyboardHide Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_ReplyMarkups_ReplyKeyboardHide.htm
Please add an example for ForceReply Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_ReplyMarkups_ForceReply.htm
Please add an example for TelegramBotClient.OnInlineResultChosen Event.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/E_Telegram_Bot_TelegramBotClient_OnInlineResultChosen.htm
Please provide a sample for SendPhoto. i store images in database and retrieve them and convert to stream. then pass the stream to the SendPhoto method but it doesn't work. also no error thrown.
var photoData = dataContext.Photos.Select(x => x.PhotoData).First();
using (var stream = new MemoryStream(photoData))
{
Bot.SendPhoto(update.Message.Chat.Id, new FileToSend("photo.jpg", stream), "photo name");
}
Please add an example for CallbackQuery Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_CallbackQuery.htm
Any once tell me what is the limit to send message on per minute or per day or any thing else?
Please add an example for ITelegramBotClient.SendDocumentAsync Method (String, FileToSend, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_ITelegramBotClient_SendDocumentAsync_3.htm
How can we use this in groups? How would I retreive the Chat ID?
I can talk with the bot in a normal chat but It doesn't reply in a group or a supergroup.
Current code:
https://github.com/KennyNL/Clevergram
Please add an example for TelegramBotClient Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_TelegramBotClient.htm
Please add an example for TelegramBotClient.SendDocumentAsync Method (Int64, String, String, Boolean, Int32, IReplyMarkup, CancellationToken).
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendDocumentAsync.htm
Please add an example for TelegramBotClient.OnMessage Event.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/E_Telegram_Bot_TelegramBotClient_OnMessage.htm
Please add an example for TelegramBotClient.SendTextMessageAsync Method (String, String, Boolean, Boolean, Int32, IReplyMarkup, ParseMode, CancellationToken).
I want to send Html content (just <br/>
tag and <a>
tag i need.)
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendTextMessageAsync_1.htm
Please add an example for TelegramBotClient.GetFileAsync Method.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_GetFileAsync.htm
Please add an example for Contact Class.
i want initialize a new contact in my app & send it to clients, how can do it?!
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_Contact.htm
Base on Bot Api documentation this method should accept a Url as well.
Is there any workaround to send the user to a url (a telegram channel or a website)?
Please add an example for TelegramBotClient.SendVoiceAsync Method (Int64, String, Int32, Boolean, Int32, IReplyMarkup, CancellationToken).
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendVoiceAsync.htm
Please add an example for ReplyKeyboardMarkup Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_ReplyMarkups_ReplyKeyboardMarkup.htm
Please add an example for CallbackQuery Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_Types_CallbackQuery.htm
Please add an example for TelegramBotClient Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/T_Telegram_Bot_TelegramBotClient.htm
Please add an example for TelegramBotClient.OnMessage Event.
TODO (optional): Describe a specific scenario you would like to see addressed.
Help Topic: https://mrroundrobin.github.io/telegram.bot/html/E_Telegram_Bot_TelegramBotClient_OnMessage.htm
Please add an example for InlineQueryResult Class.
TODO (optional): Describe a specific scenario you would like to see addressed.
How can i check if a user is spamming commands to my bot and block it for a certain time?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.