kaikyulotus / dart-telegram-bot Goto Github PK
View Code? Open in Web Editor NEWA simple pure wrapper for Telegram bot API
License: BSD 3-Clause "New" or "Revised" License
A simple pure wrapper for Telegram bot API
License: BSD 3-Clause "New" or "Revised" License
The package currently only supports ^0.13.3
http 1.0.0 is out and therefore this package will stop any project upgrading to it.
Hi.
I tried to create a basic bot with dart-telegram-bot
and faced one problem.
I starting my bot through this short set of commands:
MyBot bot = MyBot(token);
bot.start();
bot.onCommand('hello', (p0, p1) => bot.sendMessage(ChatID(p1.message!.chat.id), 'Hello user'));
bot.onUpdate((p0, p1){
print(p1);
return Future.value();
});
MyBot
class just overrides onReady
and onStartFailed
to print messages to console and creates bot with allowedUpdates: UpdateType.all
.
I setuped everything and runed it.
In direct dialog (me to bot) it reacs to both specified command and other updates(printing them).
Problem appears when this bot added to group chat:
/hello
to group chat - I have to send /hello@username_of_bot
.print(p1)
above prints update to console in direct chat, but don't printing anything from group chat.Comments:
If everything described is expected behaviour, then please describe how to configure bot to properly work with group chats.
Sometimes the bot copies messages and sends the same message twice.
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.