The code template to make a Lidraughts Bot and deploy it to heroku server easily. This is the code of @libot and similar heroku run bots in lidraughts.org
Engine communication code taken from https://github.com/AttackingOrDefending/lidraughts-bot by AttackingOrDefending
heroku-20
(allowing a maximum hash size of 512 mb)
- Fork this repository.
- Edit only your token in the
config.yml
file over here. - Create a new heroku app.
- Go to the
Deploy
tab and clickConnect to GitHub
. - Click on
search
and then select your fork of this repository. - Then
Enable Automatic Deploys
and then select themain
branch (which is already done by default usually) and ClickDeploy
. - Once it has been deployed, go to
Resources
tab on heroku and enableworker (bash startbot.sh)
dynos. (Do note that if you don't see any dynos in theResources
tab, then you must wait for about 5 minutes and then refresh your heroku page.) - Finally go to your
Settings
tab and then underConfig Vars
click onReveal Config Vars
and then in the place ofkey
type inLIDRAUGHTS_BOT_TOKEN
and in the place ofvalue
add your Lidraughts bot token
You're now connected to lidraughts and awaiting challenges! Your bot is up and ready!
For Copying the heroku codes see here
This code exsit because of Attackingordefending's bot client