From b5cd2909e479a7b72b1943915ea1cf3a0b7099db Mon Sep 17 00:00:00 2001 From: Matthieu Lalonde Date: Tue, 23 Feb 2021 06:39:38 +0000 Subject: [PATCH] Added readme... --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0431566 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# AltspaceVR Discord Bot + +Many communities on AltspaceVR also have a Discord server where they interact with eachother. +This bot allows members of these communities to bridge these two communication channels by reporting +online statuses, sending and receiving messages, and eventually track community events. + +## Usage + +To use this bot you will first need to create an AltspaceVR account for the bot. +This must be done within AltspaceVR as website signups are currently not allowed. + +Then, you will need to setup a Discord application and bot account, you may follow this +[excellent guide from matterbridge to do so](https://github.com/42wim/matterbridge/wiki/Discord-bot-setup). + +Once you have obtained all of the above credentials you will be ready to launch the bot with the following options: + +``` +./altvrbot -t -s -c -u -p +``` + +Once you have confirmed that everything works, you may want create an environment file with the following environment variables: +`DG_TOKEN`, `DG_SERVER_ID`, `DG_CHANNEL_ID`, `ALTVR_USERNAME`, `ALTVR_PASSWORD`. + +To launch the bot as a service you may want to create the following systemd service unit: + +``` +# cat /usr/local/lib/systemd/system/altspacevr-bot.service + +[Unit] +Description=AltspaceVR Presence Discord Bot + +[Service] +Type=simple +User=altvrbot +Group=altvrbot +WorkingDirectory=/var/lib/altvrbot +EnvironmentFile=/etc/default/altspacevr-bot +ExecStart=/usr/local/bin/altvrbot +Restart=on-failure +StandardOutput=journal + +[Install] +WantedBy=multi-user.target +``` + +As shown in the above example, it is preferable to create a new system user to run the bot with. + +## Building + +To build the main executable simply run `go build -o bin ./cmd/altvrbot/`. + +## TODO + +* Event Tracking \ No newline at end of file