Discord Integration - syd711/vpin-studio GitHub Wiki
Another core feature and focus of development of the VPin Studio is the integration with Discord.
A complete guilde of how to setup the VPin Studio Discord bot can be found in the preferences of the VPin Studio.
When a Discord bot should be added to a server, a list of permission can be configured which allows the bot to access the different services of a server. The given screenshots are showing the flags to set for the VPin Studio bot.
When you add the bot to your own Discord server, it needs enough permissions to create competition/subscription channels and post messages there. The simplest way to guarantee this is to grant the bot the Discord Administrator permission, which is what the screenshots below show. If you'd rather not grant full admin, the bot needs at least View Channel, Send Messages, Manage Messages, Embed Links, Attach Files and Read Message History on the channels it posts to, plus Manage Channels if you want it to auto-create new channels for Table Subscriptions. Use the Validate Settings button on the Discord bot preferences page to check whether the current permissions are sufficient - it will warn you explicitly if the bot is missing channel-management rights.

Bot Scope Flag

Bot Permission Flags

Adding Bot to Server Page
If you want to join with your cabinet/bot on other players Discord servers, neither your bot should have administrator permission, nor the administrator should add the players bot with administration permissions. Because every bot with administration rights can also create new competitions, subscriptions and post highscore messages to every channel.

Bot Scope Flag

Bot Permission Flags

Adding Bot to Server Page
Open the settings and select Discord Integration -> Bot FAQ.
Discord FAQ
Please read also the FAQ to make sure your Discord integration is working properly.
Once the bot/the bot token has been setup properly, the bot will come online on every Discord server the bot has been added to when your VPin has been started. You can now send bot commands by sending slash commands as a private message to the bot. Start with with the /commands command to get an overview of supported commands.
| Command | Description |
|---|---|
/competitions |
Returns the list and status of active competitions. |
/find <TERM> |
Returns the list of tables matching the given search term, including their id. |
/hs <TABLE NAME | ID> |
Returns the highscore for the table matching the given name or id. |
/ranks |
Returns the overall player ranking. |
/recent |
Returns the latest highscores. |
/player <PLAYER_INITIALS> |
Returns all data of this player. |
Send /commands or /help at any time to get this list from the bot itself.
Discord Bot Commands
Unlike other bots, the commands for this bot can only be send as private messages. The bot will not respond if the command is executed on a channel. The reason for this is the support for multiple VPin bots on one Discord server to support multiplayer/multi-vpin challanges.
Because every member on the server can send private messages to the bot and requests statistics, the allowed users can be limited in the Discord Integration settings:
Additionally, you can also disable bot commands completely:
Not only is the Discord bot used to receive commands and give details about tables and players. It also emits notifications for competitions and newly created highscores.
The default channel for new notifications can be configured in the preferences Bot Settings:
Default Channel Selection
By default, the VPin Studio server will send highscore updates to this channel if the corresponding table isn't part of a competition.
Competition notification are similar to the default highscore notifications, but also include the name of the competition the score has been created for. The channel where the update is posted may differ, because the update channel for a competition can be selected individually.
Altough called "offline" competitions, the updates of these competitions can be published on Discord once the bot has been setup. This gives other players which play on the same machine the opportunity to receive updates, if their scores have been beaten. The channel where these notifications are posted can be selected individually for every competition.
Read more about this in section Offline Competitions.
By adding multiple VPin Discord bots to one Discord server, the VPin Studio supports online competitions between different VPins. The notifications which are posted from every VPin to this channel are analyzed by every client to determine the current highscore while the topic of the channel contains the actual competitions details, which are the table name and the start and end date.
Read more about this competition type in section Discord Competitions.