Add readme

This commit is contained in:
Michael De Roover 2021-01-14 22:40:20 +01:00
parent e09652508a
commit db47089dc5
Signed by: vim
GPG Key ID: 075496E232CE04CB

25
readme.md Normal file
View File

@ -0,0 +1,25 @@
#### Konata the Telegram bot
This project contains the source code of the Telegram bot [@konatasanbot](https://t.me/konatasanbot). It is the code you need to make her run, although this is only a small part of the actual appliance.
Most importantly, you need a public domain name, a TLS certificate for it and a stable webserver to run this bot. The installer assumes that you do have this webserver already deployed, that your domain is configured and that your webserver is what terminates TLS and reverse proxies incoming requests to the bot. The bot's system should be Alpine, and I recommend using LXC to build it into a container.
While this sounds complicated, it's not really all that difficult to do. I will not document this however and you should look it up if you don't have these already. Which brings me to the allowed usages for this bot's source code.
#### License
While this project's source code is published to foster development on more lightweight bots, the license it is released under is "All rights reserved". You are permitted to study the code and make your own bot, using the general design elements of this one as a framework for yours (i.e. fair use). You are not however permitted to copy paste this code verbatim into your bot, unless you retain all references to my work and acknowledge that I wrote it. Especially replacing the readme with Indian images (like what has happened with other Telegram bots in the past) and calling it your own will not be tolerated. It is not a stretch to say that this is why the license is what it is.
#### Bot weight
This bot has been made in an attempt to replace bots written with Telethon, Pyrogram etc. I used to run a userbot based on Telethon, but the code was very arcane and heavyweight. It wasn't easy to keep it up-to-date either, and vulnerabilities were common. My account on Telegram has too much access for this to be reasonable. As such I tried to move all of the features I would use in my userbot / other bots into this one. And it works out well! At the time of writing, Konata consumes ~5MB RAM and ~85MB storage for the entire Alpine container it runs in.
#### Limitations
Currently this bot is not asynchronous. A command comes in, the bot executes it, and all other commands will be queued until the current one is finished. I am working to improve this. It could be done either by using FastCGI, or by adding multithreading support in the main script. Both have their advantages and disadvantages. I am still undecided on what I wish to go with.
#### Contributing
I hope you'll like using this bot, and learn about the various ways you can run one. If you have any features you'd like to see, feel free to open a pull request along with code against [this repo](https://git.ghnou.su/ghnou/konata/issues). Please make sure to follow the existing coding standards (i.e. case statement, functions, tab indentation etc) when contributing your own.
Enjoy!