Skip to main content

webdiplomacy status reporter bot for discord

Project description

Build Status

summary

This is a discord bot which scrapes the current status of games at webdiplomacy and announces that information on discord.

It also incorporates a very rudimentary cli tool which does the same thing on the host.

functionality

For the moment it only produces one kind of announcement, in the following format:

"It is the [season] of [year]. We are awaiting the order of: [list of non-ready players with their order statuses]"

In a discord channel it will do this in response to the message "$status".

run as a cli app, it will simply output a similar message and terminate.

configuration

dipbot depends on two environment variables which must be correctly set for it to function.

In order to know which game to parse, the environment variable WEBDIP_GAME_ID must be set to the corresponding webdiplomacy.com game id. This is the number at the end of the webdiplomacy url for the game; for instance, in the following URL, the id is 111111

https://webdiplomacy.net/board.php?gameID=111111

In addition, to host the discord bot yourself it's necessary to create a bot account as described here, and to set the environment variable DISCORD_API_KEY to the value of the bot's token.

The easiest way to manage these environment variables is to set them in the file init.sh in the project root, and then to run dipbot from the project root like this:

source init.sh; python3 src/dipbot/dipbot report # for the cli command, or
source init.sh; python3 src/dipbot/dipbot daemon  # for the discord bot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dipbot-0.1.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page