Coder Social home page Coder Social logo

telegrambots / telegram.bot.examples Goto Github PK

View Code? Open in Web Editor NEW
602.0 41.0 279.0 596 KB

Examples for the Telegram.Bot C# Library

License: MIT License

C# 73.04% Shell 3.27% F# 23.43% HTML 0.26%
telegram-bot-api csharp telegram bot examples fsharp telegram-bot

telegram.bot.examples's Introduction

Telegram.Bot Examples

telegram chat package documentations master build status

About

This repository contains sample applications based on Telegram.Bot library:

Comunity projects

  • GreenCaptchaBot a spam-protection bot. This is a bot that will ask the users coming to a Telegram chat to press a random numbered button.
  • vahter-bot the bot that bans.

Legacy projects

These projects represent older or deprecated technologies you might want to use, though we do not provide any support for those projects:

Requirements

Examples in this repository use .NET 6. You might need to install required version from here.

Community

Feel free do join our discussion group!

telegram.bot.examples's People

Contributors

arvindd avatar denchik3713 avatar dependabot[bot] avatar dmitrybryluk avatar dtymakhov avatar ich1gosan avatar karb0f0s avatar luilver avatar mihazupan avatar mrroundrobin avatar philomela avatar powerlay avatar tiago-aguiar-moreira-2 avatar tuscen avatar ungerfall avatar wiz0u avatar wouterjanson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram.bot.examples's Issues

Groups

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

Sample for SendPhoto

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 help

How can i check if a user is spamming commands to my bot and block it for a certain time?

Add an Example for TelegramBotClient.SendAudioAsync Method (Int64, FileToSend, Int32, String, String, Boolean, Int32, IReplyMarkup, CancellationToken)

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

Add an Example for TelegramBotClient.SendTextMessageAsync Method (String, String, Boolean, Boolean, Int32, IReplyMarkup, ParseMode, CancellationToken)

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

Add an Example for TelegramBotClient.SendDocumentAsync Method (Int64, FileToSend, String, Boolean, Int32, IReplyMarkup, CancellationToken)

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

setup webhook

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

How @like bot Works ?

hi
sorry i am weak in english
@like bot create a message with emoji like-buttons
i want develop like this bot
i need help

i used InlineKeyboardButton
and OnCallbackQuery event
and for replay Bot.AnswerCallbackQueryAsyn.. user can view popup or alert
it is not suitable

how @like bot works?

How to send 30 in 1 second to different user?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.