Coder Social home page Coder Social logo

alvarogzp / telegram-bot-framework Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 3.0 790 KB

Python Telegram bot API framework

License: GNU Affero General Public License v3.0

Python 98.43% Shell 1.57%
python python3 telegram telegram-bot-api telegram-bot python-framework bot-framework telegram-bot-framework

telegram-bot-framework's People

Contributors

alvarogzp avatar gboquizosanchez avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

telegram-bot-framework's Issues

Send api errors to current chat?

Example: bot.api.telegram.TelegramBotApiException: Message is too long

It is being sent to admin, and the command does nothing to the user. Maybe is more appropriate to send also to the chat, to make them know an error has happened.

Take care to only send this kind of messages in response to commands or actions that the user expect a response from the bot, to avoid the bot spamming errors when it should be quiet.

Make messages simpler?

That is, to use /messages message_id syntax instead of /messages show message_id, or to add buttons to view a message.

Make api dynamic

To avoid having to modify it for every new param that is used

Persist User info

Every "from" User info should be persisted so that later user_ids can be mapped to username and/or first_name last_name.

For example, hashtags store user_ids.

Remove old messages

For example, when there are more than 2000 messages, remove the 1000 older.
If possible, do it in batches to avoid writing too much to the disk.

Multilanguage bot

Yo, can you write a bot multilanguage? Some people have a bad habit. Some people want to read things in their language... xD

sendMessage crashes when showing last pole if deleted

If a user deletes its pole message and then requests to show it by using /poles last, bot will throw an exception because the message replied to no longer exists.

One option is to disable completely replying to pole messages, and user messages in general (except for bot commands).

Fix pole gap bug

From code comment:

            # FIXME this does not work as expected
            # FIXME it only resets the current chat status,
            # FIXME and only if this action is executed (eg. it is is a normal message)

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.