Echo-bot for messagers
- Resends user's message to user;
- Allows the user to choose number of bot replies;
- Using Sqlite3 as DB for store user settings;
- Supports 2 api:
- telegram;
- vk (supported Version 5.5);
- Supports 4 levels of logging:
- error-level(default): show only error messages;
- warning-level: show only error and warning messages;
- info-level: show info, error and warning messages;
- debug-level: show even more details than info-level;
You may clone GitHub repository
git clone https://github.com/LyuPo7/bot.git
-
Setup data/config.json (for example see config-json-file: 'data/config_tele.json' for Telegram and 'data/config_vk.json' for Vk)
- "api_settings"
- "bot_api": must be one of ["vk", "telegram"];
- "bot_token": token for vk/telegram bot;
- "bot_initial_reply_number": will be used as initial reply number for any new chat;
- "bot_question": quetion in reply to /repeat command;
- "bot_description": message in reply to /help command;
- "logger_settings"
- "verbocity": level of logging - must be one of ["debug", "info", "warning", "error"];
Since bot use Sqlite3 You'll need check if you have installed Sqlite3 in your system (if not - use):
- $ sudo apt-get update -y && sudo apt-get install sqlite3 libsqlite3-dev -y
-
- $ stack build
-
- $ stack exec bot-exe