The chat bot Zozin does not want you to know about.
Quick Start
Gatekeeper
Gatekeeper is the bot process itself.
$ go build ./cmd/gatekeeper/ $ ./gatekeeper
Gaslighter
Gaslighter is the bot configuration command line tool which works by connecting to the bot's database and modifying it.
$ go build ./cmd/gaslighter/ $ ./gaslighter
Environment Variables
| Name | Description |
|---|---|
GATEKEEPER_DISCORD_TOKEN |
Discord token https://discord.com/developers/docs/topics/oauth2 |
GATEKEEPER_PGSQL_CONNECTION |
PostgreSQL connection URL https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6 |
GATEKEEPER_TWITCH_IRC_NICK |
Twitch Login |
GATEKEEPER_TWITCH_IRC_PASS |
Twitch Password https://twitchapps.com/tmi/ |
GATEKEEPER_MPV_IPC_ADDRESS |
Address for the MPV IPC control to listen to. Format is <ip>:<port> |
MPV Control
When GATEKEEPER_MPV_IPC_ADDRESS is provided bot starts listening for MPV IPC on that address and port. It is intended to be used in conjunction with mpv-client to make the bot report currently playing songs.
Security Considerations
The connection and the protocol are insecure and lack any authentication or encryption. Because of that it is highly advised to set the address of GATEKEEPER_MPV_IPC_ADDRESS to 127.0.0.1:<port> and connect the mpv-client through an SSH tunnel if the bot is hosted on a remote machine.
Quick Start via SSH tunnel
Make sure GATEKEEPER_MPV_IPC_ADDRESS is set to 127.0.0.1:8080 on your remotemachine host.
Build the mpv-client:
$ cc -o mpv-client ./cmd/mpv-client/mpv-client.cEstablish the SSH tunnel:
$ ssh user@remotemachine -N -L 8080:127.0.0.1:8080Play the song with the mpv-client (make sure mpv is installed as the mpv-client wraps around it).
