Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING changes to everything, new chat types, proper API responses (fully dynamic 🔥) and re-write of the entire library.
For the biggest changes, see src/chats.ts.
notes
Had to change the whole environment abstraction a few times to end up with the current one. I think this is the perfect one. It has a environment, the bot and its test user/chat type lives in. All bot responses (methods called to the Bot API server) are handled globally in the environment. But chat type related update senders are defined in the chat types themselves.
A few of the TODO items. For more lists, just search "TODO" in the code, I've left a few in several places; few of the important ones can also be found on the src/chats.ts file.
Hopefully, I could make the following syntax possible in this library. I see a way for it, so it should be possible.
A /cc to @KnorpelSenf if you're interested.