App version: 1.0
Reputation telegram bot is a simple bot for Telegram for calculating user reputation.
The main implementation - Dawg Reputation Bot.
This project uses Zube extenstion for GitHub for tracking new features and improvements and simple GitHub board for tracking bugs.
The main goal: every time when one of the users replies to the user's message with a key word (e.g. "+" or "-"), then that user's reputation goes up or down.
toprep- Show first 10 users with highest reputation;minrep- Show last 10 users with minimal reputation;myrep- Show reputation of current user.
health_check- Get health status.
- Language: OpenJDK 11
- Framework: Spring Boot
- Build tool: Gradle
- Database: PostgreSQL
- Database migration: Liquibase
- Logging: Slf4j(Lombok)
- IDE: IntelliJ IDEA
- IDE e.g. IntelliJ IDEA
- Gradle (version 6.3+)
- Docker Desktop
- PostgreSQL and a database desktop admin tool e.g. Dbeaver
- Set Main class to: com.telegram.rtb.TelegramReputationBotInit
- Set Environment Variables
- Menu bar -> Run -> Edit configuration -> Environment variables
- Install Project Lombok plugin
Preferences->Plugins->Marketplace-> search Lombok and install -> restart IDEPreferences->Build, Execution, Deployment->Compiler->Annotation Processors-> pickEnable annotation processing
BOT_TOKEN- Telegram bot token;BOT_USERNAME- Telegram bot username (only text without @);JDBC_DATABASE_URL- Database url;JDBC_DATABASE_USERNAME- Database username;JDBC_DATABASE_PASSWORD- Database password;JDBC_DATABASE_NAME- Database name;APP_URL- Application url (e.g. for local -http://localhost:8080);PING_CRON- Cron expression (e.g.0 0/10 * * * *- each 10 minutes);IGNORE_USER_IDS- List of telegram user ids to ignore to calculate reputation, can be empty.
To run local database via docker execute the following command from shell inside app directory: docker-compose up -d
To run migration execute the following command from shell inside app directory: gradlew update.
This is required the first time you launch the application! Next times launch is required to update.
- Email: [email protected]