grim/wasdead

eb431873f7e8
Try to salvage a run by moving the database out of the way
# WasDead
WasDead is a discord bot that monitors the presence of users on the server it
is connected to and announces automatically when they are streaming.
# History
This project was started at
[TheToyz/nowdead](https://bitbucket.org/TheToyz/nowdead/) and later adopted to
where it resides today.
The name is a pun of the [Now Live](https://discordbots.org/bot/nowlive)
Discord which we were previously using because it it would auto announce
whenever anyone in the server sould start streaming. This worked great for
quite a while, but then Now Live started having issues and this feature stopped
working. After a few months of waiting, we created WasDead.
# Installation
## Using the Public Version
As of right now the bot is not public and can only be added to servers by
Gary Kramlich <grim@reaperworld.com>. Once the bot is a bit more featureful
and polished it will be made public and it will be made public.
In the mean time, this is the link that is necessary to add the bot to a
server. As mentioned above this will error out for anyone that's not Gary
Kramlich.
```
https://discordapp.com/oauth2/authorize?client_id=563902261001060371&scope=bot&permissions=19456
```
## Self Hosting
To run the both locally you'll need to setup a Discord application and get the
bot token for it. You will also need to create a twitch application and get
it's client id.
Once you have those, you can start the bot with
```
./wasdead run --discord-token=DISCORD_TOKEN --twitch-client-id=TWITCH_CLIENT_ID
```
# Usage
There are a couple of commands that are available to you. Once the bot has
joined your server, you need to tell it what channel it should post the
automatic announcements in. You will do this with the `set-channel` command.
All commands are sent to the bot in a channel and must mention the bot at the
start of the message. Ie: `@wasdead help`.
| Command | Arguments | Description |
+-------------+-----------+-------------+
| help | None | Displays usage information. |
| set-channel | None | Sets the current channel to the announcement channel. |
| show-config | None | Shows the configuration for the current server. |
| status | Optional | Displays the streaming status for the user sending the message or a given target. |
| uptime | None | Display how long the bot has been running. |