Telegram Bots
the bot that started it all (for me)
mtfutilsbot
literally a page about modularizing functions i guess, in practical sense
Modules
types and data structures that need to be considered
objects
contracts between classes, for abstraction
interfaces
like interfaces, but here we have an implementation. The catch is, they run OUTSIDE of a bot context.
runners
So here's the general idea right now.
- I try to identify some objects and interfaces to implement
- I implement a couple in a "plugin-like" configuration, in native code
- I create a little task-runner that can load one up and process data with it on CLI
- I convert whatever mtfutilsbot is doing over to use the little runner instead
- When I've got a few of them sorted, I'll have a better idea of how to hook them better into a native bot, and I can work a bit on the other side
- gradually migrate all the little runners over to libraries for the new bot
I'm also thinking..... tdlib has a lot of great stuff. And I know how to use dlopen or whatever to load and run plugins... But what I might do is develop against Qt5 the whole while. That'll make me a bit slower and heavier, but it'll also give me a smoother ride with possible future problems such as windows deployment and blah blah.
Why not boost? Never tried it lol
Unknown Object (Project) |
- Last Author
- chrisw
- Last Edited
- Jun 10 2021, 11:58 PM