A Telegram bot for training your brain using questions from What?Where?When? database(in Russian).
You can find bot by his nickname - @QuizTrainBrainBot.
- Install ruby
- Install gem bundler
- Configure PostgreSQL
- Run
bundle install
- Create directory confings in project directory, create files database.yaml and secrets.yaml
- Put database config in database.yaml, e.g.
adapter: postgresql database: braintrain encoding: unicode pool: 5 timeout: 5000
- Put TelegramBot secret token(bot_api_key) into secrets.yaml, e.g.
bot_api_key: 'DDDDDDDDD:XXXXXXxxxxDDDXx_DXxXXxXxDDXxxXxXxxX'
- Run
rake db:start
for creating database - Run
rake db:migrate
for performing migrations - If you need to drop or reload database you can use
rake db:drop
andrake db:reload
- Make file bin/app.rb executable
chmod +x bin/app.rb
- Run
bin/app.rb
for starting bot - Have fun!