leonqn / rutebot Goto Github PK
View Code? Open in Web Editor NEWTelegram bot api bindings for rust programming language
License: MIT License
Telegram bot api bindings for rust programming language
License: MIT License
This is such a nicely architectured framework! I was looking for one that provided exactly this level of flexibility. Really well done!
I was wondering whether you would like some input on the code from my part. There are a few small things I noticed while browsing through the code. I could open PRs for them, if you'd like. For example:
update_poll_stream.rs
contains an UpdatesPoolStream
struct. Maybe it should be renamed accordingly?send_text.rs
module corresponds to the sendMessage
Telegram API method. Maybe also rename?I would be happy to start contributing some small PRs for these things, so I can get to know the code base. Maybe I'll even find time to propose some bigger contributions, but for now, would you like me to work on issues like the above?
I really liked that the submodules would link to the corresponding Telegram API method. Do you think it's a good idea to add such links for all types?
E. g., for the update response, we could add the link to the end of the description:
This object represents an incoming update. At most one of the optional parameters can be present in any given update
See Update in the Telegram API documentation for more details.
I'm only unsure about types like ChatId
, that totally make sense, but only implicitely exist in the Telegram API. But even those could refer to the documentation.
What do you think?
Running cargo fmt
makes changes to 52 files. I think it's worth setting up auto-formatting with rustfmt.
You could even let the CI check that everything is properly formatted with cargo fmt -- --check
, therefore ensuring that only properly formatted code is merged.
I did not yet make a PR, because changing formatting on 52 files might be annoying if you are currently working on them. I suggest you simply run the command yourself when it best suits you.
Hi, I can't find getHistory and anything related to history in rutebot. Am I missing something or is there a planned support for this ?
I'd also like to help with that, but don't know where to start.
There are a lot of modules in requests/
. If I understand correctly, these are just to avoid having one gigantic file. But importing them seems slightly tedious.
We could reexport the request types from requests
itself. There shouldn't be any nameclashes, because the names are the ones from the Telegram API, which doesn't have nameclashes. And it would simplify importing the request types.
The only change needed is to convert each line from
pub mod send_text;
to
mod send_text;
pub use send_text::*;
Do you want me to work on a PR for this?
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.