Telegram bot for painting competitions organized by Warhammer Community of Uzbekistan. Based on AbilityBot
- copy the source
git clone https://github.com/fire-papaya/paint_contest.git
- build the bot
cd paint_contest
and
./gradlew clean bootJar
the built fat .jar will be located at bot/build/libs
- Place configuration
.yaml
file next to.jar
. Naming convention isapplication-{your-profile}.yaml
. E.g.application-test.yaml
tg:
bot:
token: token ## telegram token here
username: username ## your telegram username, the username will be given CREATOR rights to manage admins and AbilityBot
creator: 123456789 ## your telegramId
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3310/paint_contest ## connection and name of the mariadb database
username: root ## db connection username
password: ## db connection password
- run the bot with
java -jar -Dspring.profiles.active=test bot/build/libs/bot-0.4.1.jar
- to manage painting contests promote your self to Admin: within telegram itself send the comman:
/promote your_telegram_username
-
in the database add in the table
community
new row for your community with the name and short code -
find yourself (by telegramId or username) in the database and set yourself as admin (
is_admin
). Create connection incommunity_admin_user