An AltspaceVR to Discord presence and messaging bot.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matthieu Lalonde 8e49a73a63
Additional package comments.
5 years ago
cmd/altvrbot Removed all TODO item comments, moved to tracker. 5 years ago
pkg Additional package comments. 5 years ago
.gitignore Added .vscode to gitignore... 5 years ago
README.md Fixed missing mkdir... 5 years ago
go.mod Added godotenv 5 years ago
go.sum Added godotenv 5 years ago

README.md

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