FAQ

FAQ


Give me the example? ID: 5e23be87ee06d67569cd0626

https://github.com/TelegramBots/Telegram.Bot.Examples

What example can I use? ID: 5e23be88ee06d67569cd0627

https://github.com/TelegramBots/Telegram.Bot.Examples

What function should I use? ID: 5e23be88ee06d67569cd0628

https://core.telegram.org/bots/api#available-methods

If user reply to himself (like i did with this message) bot`s update would not have value for "ReplyToMessage"? ID: 5ef873869e0f6277dfb8775a

but have you tried checking privacy settings of the bot? i don't think that this should have an effect but maybe it does have

how can I send a bot message to a specific person? ID: 5f033ea49ea99d4bba341f57

await client.SendTextMessageAsync(userId, "message")

How do I use an HTTP/Socks proxy? ID: 5f32b7a5996cd169afcb6186

Look at the wiki page: https://telegrambots.github.io/book/4/proxy.html

I got a '409' error. What do I do? ID: 5f32b7d3996cd169afcb6188

You are trying to receive updates multiple times at the same time. Either you are calling GetUpdates from two instances of the bot, or you are calling GetUpdates while a web hook is already set. That is not supported by the API, only receive on one instance.

How do I get the user id from a username? ID: 5f32b7e1996cd169afcb618a

There is no way to do that with the API directly. You could store a list of known usernames, mapped to ids. This is not recommended, because usernames can be changed.

How do I get updates in channels? ID: 5f32b83e1c0df16cc7a0b8b2

If you are using polling, you will have to subscribe to the OnUpdate event. Check the UpdateType of the Update. If it is UpdateType.ChannelPost then the Update.ChannelPost property will be set.

I have serialization issues or null values in Update object in my webhook. What do I do? ID: 5f32b8511c0df16cc7a0b8b4

If you're using ASP.NET Core 3.0+ you need to install additional Nuget package: Microsoft.AspNetCore.Mvc.NewtonsoftJson. For more information read this page about migrating from previous versions of ASP.NET Core.

How do I create a bot? ID: 5f32b8731c0df16cc7a0b8b6

Creating Telegram bots is super-easy, but you will need at least some skills at computer programming. In order for a bot to work, set up a bot account with @BotFather, then connect it to your backend server via our API.

Unfortunately, there are no out-of-the-box ways to create a working bot if you are not a developer. But we're sure you'll soon find plenty of bots created by other people to play with.

How do I download files? ID: 5f32b9251c0df16cc7a0b8b8

Use the getFile method. Please note that this will only work with files of up to 20 MB in size.

How do I upload a large file? ID: 5f32b9361c0df16cc7a0b8ba

Bots can currently send files of any type of up to 50 MB in size, so yes, very large files won't work for now. Sorry. This limit may be changed in the future.

My bot is hitting limits, how do I avoid this? ID: 5f32b94f1c0df16cc7a0b8bc

When sending messages inside a particular chat, avoid sending more than one message per second. We may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors.

If you're sending bulk notifications to multiple users, the API will not allow more than 30 messages per second or so. Consider spreading out notifications over large intervals of 8—12 hours for best results.

Also note that your bot will not be able to send more than 20 messages per minute to the same group.

How can I message all of my bot's subscribers at once? ID: 5f32b95f1c0df16cc7a0b8be

Unfortunately, at this moment we don't have methods for sending bulk messages, e.g. notifications. We may add something along these lines in the future.

In order to avoid hitting our limits when sending out mass notifications, consider spreading them over longer intervals, e.g. 8-12 hours. The API will not allow bulk notifications to more than ~30 users per second, if you go over that, you'll start getting 429 errors.

Do you have any library guide? ID: 5f32bb724bc1096e3466a476

This should be in official library book:
https://telegrambots.github.io/book/

I receive SSL/TLS Error? ID: 5f32bc974bc1096e3466a47a

https://github.com/TelegramBots/Telegram.Bot/issues/867

How to get all users that are in a chat with my bot? ID: 5f32bcaf4bc1096e3466a47c

Currently, it is impossible to get the list of all users that are in a chat with the bot or began the conversation with a bot. You need to keep track of users manually (by saving them in a database or else)

Does this library support that? ID: 5f344e6cfa8e73211bf8bd39

This library supports only bot api. Current supported version you can find here: https://github.com/TelegramBots/Telegram.Bot/blob/master/CHANGELOG.md

Report Page