-
Notifications
You must be signed in to change notification settings - Fork 14
Running Tutorial
Alex Sokol edited this page Apr 10, 2021
·
6 revisions
Dockerfile available for running, please check Dockerfile and prizebot.env
To run this bot by yourself provide the bot token with BOT_TOKEN
environment variable.
You can also specify LOG_CHAT_ID
if you want to send crashes to some chat.
First, provide this environment variables:
DATABASE_URL
DATABASE_USER
DATABASE_PASSWORD
-
DATABASE_DRIVER
- driver class name (optional, by default 'Exposed' will try to extract it from url)
Do not forget to include the driver dependency via gradle, Postgres included by default
it will be created automatically on first start, but in case it will be changed during releases you have to update schema manually. Note that there are no plans for compatibility or DB migrations
Table states
:
field | type |
---|---|
channel | BIGINT NOT NULL |
data | TEXT NOT NULL |
Table giveaways
:
field | type |
---|---|
id | BIGINT AUTOINCREMENT |
ownerId | BIGINT NOT NULL |
title | TEXT NOT NULL |
participateButton | TEXT NOT NULL |
languageCode | TEXT DEFAULT NULL |
winnerId | BIGINT DEFAULT NULL |
raffleDate | TEXT DEFAULT NULL |
winnersCount | INT NOT NULL |
Table giveaways_active_messages
:
field | type |
---|---|
rowId | BIGINT AUTOINCREMENT |
giveawayId | BIGINT NOT NULL |
inlineMessageId | TEXT NOT NULL |
Table language_codes
:
field | type |
---|---|
userId | BIGINT NOT NULL |
languageCode | TEXT NOT NULL |
Table winners
:
field | type |
---|---|
giveawayId | BIGINT NOT NULL |
winnerId | BIGINT NOT NULL |