An AltspaceVR to Discord presence and messaging bot.
Find a file
2021-02-23 06:49:39 +00:00
cmd/altvrbot Removed all TODO item comments, moved to tracker. 2021-01-27 19:38:24 +00:00
pkg Additional package comments. 2021-02-23 06:49:39 +00:00
.gitignore Added .vscode to gitignore... 2021-01-26 08:23:13 +00:00
go.mod Added godotenv 2021-01-26 02:13:11 +00:00
go.sum Added godotenv 2021-01-26 02:13:11 +00:00
README.md Fixed missing mkdir... 2021-02-23 06:43:25 +00:00

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.

Once you have obtained all of the above credentials you will be ready to launch the bot with the following options:

./altvrbot -t <discord-auth-token> -s <discord-server-id> -c <discord-channel-id> -u <altspacevr-username> -p <altspacevr-password>

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 mkdir -p bin ; go build -o bin ./cmd/altvrbot/.

TODO

  • Event Tracking