Competitive programming contests reminder bot, powered by https://clist.by.
Currently only Line bots exist. More to come. Meanwhile, add me on Line!
Prerequisite:
- Redis
- Line channel with
REPLY_MESSAGEandPUSH_MESSAGEcapability. Register here: https://developers.line.me/en/ - CList API Key. Get one here: https://clist.by/api/v1/doc/
Envvars:
CLIST_APIKEY=username:...withoutApiKeyREDIS_ENDPOINT=host:portLINE_CHANNEL_SECRETLINE_CHANNEL_TOKENLINE_GREETING_MESSAGEmessage to be shown upon join/add as friend eventLINE_DAILY_DEFAULTdefault schedule for daily reminderLINE_DAILY_PERIODperiod of cron job of sending daily reminder. Suggested: 1800 (half an hour)LINE_MAX_MESSAGE_LENGTHmax length of a message. Limit from Line is 2000. Suggested: 1000.
Running locally: Use realize to develop locally and watch for file changes.
go get github.com/tockins/realize
CLIST_API_KEY=... \
MORE_ENVVAR=... \
realize runLine requires SSL for all their webhooks. I suggest deploying to Heroku.
After that, set your line webhook to https://url/line/callback