quernd / sushibot Goto Github PK
View Code? Open in Web Editor NEWA simple Telegram bot that receives and sends cat photos
License: MIT License
A simple Telegram bot that receives and sends cat photos
License: MIT License
Authorized users can feed photos to the bot to be saved in the database. Right now, only the first photo is saved. Make sure to save all the photos and reply accordingly (it's just a matter of iterating over a list instead of List.hd, as they are all in the same list).
Both cohttp
and caqti
have been ported.
Photos uploaded by authorized users are stored in the database (and will be sent out randomly) but the photo ID is not logged and there is no way to manage photos.
It would be nice if authorized users could:
Possible extension (requires changes to the database structure):
When a user uploads a new photo, send it to everybody who has previously interacted with the bot.
For some unknown reason, the bot got stuck waiting for an update a few days ago:
2021-02-04 14:44:14,524 DEBG 'sushibot' stdout output:
Asking for updates with offset 126961621
2021-02-04 14:45:04,951 DEBG 'sushibot' stdout output:
200 OK
{"ok":true,"result":[]}
2021-02-04 14:45:04,951 DEBG 'sushibot' stdout output:
Asking for updates with offset 126961621
2021-02-04 14:45:55,382 DEBG 'sushibot' stdout output:
200 OK
{"ok":true,"result":[]}
2021-02-04 14:45:55,382 DEBG 'sushibot' stdout output:
Asking for updates with offset 126961621
And that was the end of it. No errors were logged.
Possible fix: Make sure to use a timeout in all requests and handle timeouts accordingly (retry with exponential backoff?)
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.