Coder Social home page Coder Social logo

kaikyulotus / dart-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 7.0 518 KB

A simple pure wrapper for Telegram bot API

License: BSD 3-Clause "New" or "Revised" License

Dart 100.00%
api-wrapper dart dartlang telegram-bot telegram-bot-api telegram-bots

dart-telegram-bot's Introduction

Kaikyu Lotus Github

If you like my work feel free to follow my Telegram Channel

Thank you for starring my repos!


dart-telegram-bot's People

Contributors

ale183 avatar kaikyulotus avatar kaikyutest avatar kyouindev avatar leematthewhiggins 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

Watchers

 avatar  avatar  avatar  avatar

dart-telegram-bot's Issues

Upgrade to support http 1.0.0

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.

[Incorrect issue] Don't receiving updates from group chats

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:

  1. it's not enough just send /hello to group chat - I have to send /hello@username_of_bot.
  2. print(p1) above prints update to console in direct chat, but don't printing anything from group chat.

Comments:

  • I'm not sure if problem 1 is expected behaviour or not. I just seen bot which reacts to user's messages without writing bot's username after command.
  • didn't found in this library's docs anything specials which should be configured for group chats
  • inside the group chat there are all 8 of 8 permissions enabled without exclusions

If everything described is expected behaviour, then please describe how to configure bot to properly work with group chats.

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.