Skip to content

A Discord bot for displaying whatsnew.txt for the OHRRPGCE

License

Notifications You must be signed in to change notification settings

ohrrpgce/OHRWhatsNewDiscordBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OHRWhatsNewDiscordBot

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.

Installation:

  1. Install Python 3 (https://www.python.org/downloads/)

  2. Install module requirements: pip install -r requirements.txt

  3. Fetch ohark with git submodule init, git submodule update

  4. Make a copy of OHR-WhatsNewBot/example_config.json, name it OHR-WhatsNewBot/config.json and add your APP_TOKEN, UPDATES_CHANNEL and ALLOWED_CHANNELS (where most ! commands are restricted to). Possibly customise other options (see the top of bot.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".

Usage

  1. cd OHR-WhatsNewBot

  2. 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).

  1. In any of the allowed channels, users can use !help, !check and other commands.

  2. You can use the !rewind_commits <n> command followed by !check to test the bot.

  3. 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. If MAX_CHECK_DELAY_HOURS (26) pass without new nightly builds, it'll go ahead and post git commits regardless.

  4. Ctrl+C to kill the bot. It'll read state/state.json and resume where it left off when restarted, without missing anything.

Known issues

None.

About

A Discord bot for displaying whatsnew.txt for the OHRRPGCE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%