A Discord bot that watches for and reports new git commits, changelog updates (whatsnew.txt and IMPORTANT-nightly.txt) and nightly builds for the OHRRPGCE.
This bot can only be added to one guild (server) at a time.
-
Install Python 3 (https://www.python.org/downloads/)
-
Install module requirements:
pip install -r requirements.txt
-
Fetch ohark with
git submodule init
,git submodule update
-
Make a copy of
OHR-WhatsNewBot/example_config.json
, name itOHR-WhatsNewBot/config.json
and add yourAPP_TOKEN
,UPDATES_CHANNEL
andALLOWED_CHANNELS
(where most ! commands are restricted to). Possibly customise other options (see the top ofbot.py
for docs).
You can get your APP_TOKEN
at https://developer.discord.com and the channel IDs can be obtained by
right clicking on a channel on discord and selecting "Copy Channel ID".
-
cd OHR-WhatsNewBot
-
Launch with:
python3 bot.py
-- Success looks like this:
discord.client logging in using static token
discord.gateway Shard ID None has connected to Gateway (Session ID: cdcac418e852ee7fc167f2cb3ab77635).
Logged in as OHR Whats New Bot
Started OHR WhatsNew Bot
------
No/invalid state.json, initialising state
The bot will then immediately perform its first check (which will find nothing if this is the first run).
-
In any of the allowed channels, users can use
!help
,!check
and other commands. -
You can use the
!rewind_commits <n>
command followed by!check
to test the bot. -
Or just do nothing and the bot will post devlog updates once a day, and SS gamelist updates 3 times a day, if there are any. It will take up to
MINUTES_PER_CHECK
after nightly builds are built before it posts any git commits (and log changes) made that day. IfMAX_CHECK_DELAY_HOURS
(26) pass without new nightly builds, it'll go ahead and post git commits regardless. -
Ctrl+C to kill the bot. It'll read
state/state.json
and resume where it left off when restarted, without missing anything.
None.