Hier the design of the application and open issues are documented.
For contributes see here.
The bot listens to all messages, then does the following (see src/parts/listeners.js for more):
- ignores posts by bots, regardless of content
- ignores too old messages, regardless of content
- if message has the syntactic form
@<botname> /?command [args...]
, then:- if command in config, then performs corresponding action;
- else does nothing.
- if message has the syntactic form
/command @<botname>
, then:- if command in config, then performs corresponding action;
- else does nothing.
- otherwise, does nothing.
The bot currently supports 5 languages and decides which language to use based on the following priorities (highest to lowest):
-
Language hard coded into the assets/config.yaml file for the command under
lang:
, if set. -
Language given as an argument by the admin when using
@<botname> cmd [args…]
, if provided. -
Language of the message to which the admin replied to, if the call occurred this way.
-
Language of the admin who called the command. -
The default language set in assets/config.yaml under
default-language:
(currentlyuk
--- Ukrainian).
See CONTRIBUTING.md.
- It is unclear, whether the stopping proceedure for the bot is correct.
- Functionality of the bot is okay, but we should consider switching to
golang
, for which there is a well developed Telegram-API and which compiles, which in turn allows for cleaner development. - Alternatively, there is are well structured
python
APIs (python-telegram-bot + telethon), and in python one can at the very least artificially encode typing hints in all methods, allowing for cleaner development. - Integration tests needed (currently developers are experimenting with possibilities here), in order to automatically test behaviour to increase the QA of each release and avoid »ärgerliche« bugs.