Discord Application
Previous Step: Login to Drivers Hub
You've logged in to the Drivers Hub and ready to start configuring things! But before we make it more customized, you need to configure Discord Application so that users could sign up and login with their Discord Account, which is the only way to become a user in Drivers Hub.
-
Open Discord Developer Portal and click New Application.
-
Enter the name of the application, check the "agree box" and click create.
There's no requirement on the name, it could be anything you want.
-
(Optional) Customize the application.
App icon will be displayed when users authorize their Discord Account. Description will be the About Me of the bot that we will create later.
-
Navigate to OAuth2 - General and reset Client Reset.
i) Click Reset Secret.
ii) A prompt will be shown. Click Yes, do it!
iii) You'll be asked for 2FA Code if enabled. Enter the code and click Submit.
-
Copy Client ID and Client Secret, switch to Drivers Hub tab and paste them as
discord_client_id
anddiscord_client_secret
in JSON Config.
-
Switch to Discord Developers Portal, create a bot.
i) Navigate to Bot, and click Add Bot.
ii) A prompt will be shown. Click Yes, do it!
-
(Optional) Customize the bot.
Icon will be the bot's avatar.
-
Scroll down, enable all Privileged Gateway Intents.
-
Reset the bot's token, just like when you reset the client secret.
-
Copy Token, switch to Drivers Hub tab and paste it as
discord_bot_token
in JSON Config.
-
Open Discord Application, go to the VTC's Discord Server, right click it's name, then click Copy ID.
Note that you have to enable Developer Mode to make Copy ID button show. We won't provide guide on enabling Developer Mode here as there's hundreds of existing guide on the Internet.
-
Switch to Drivers Hub tab, paste the ID as
guild_id
in JSON Config.
-
Save config. (You cannot reload until you enable MFA)
-
Switch to settings and enable MFA.
-
Switch to configuration and reload API.
-
Invite the bot to VTC's Discord Server. This could be done by changing the scopes in URL Generator to
bot
andapplication.commands
, and checking Manage Roles, Send Messages, Read Message History in bot permissions (note that these permissions are required by Drivers Hub Discord Integration, it might need more permissions if you use the bot for other purposes). Then copy the generated URL and open it in browser to add the bot to a Discord Server.
Please search on the Internet if you need more guide on inviting a bot to a Discord Server.
-
WaitThesomeAPItimereloaduntilusually takes up to 60 seconds. You will have to clear browser cache for theAPIwebsitefullybeforerestart.tryingThentocreate a Prvate Window or enter Icognito Mode and try logging inlogin with Discordto(becauseseetheifdiscord_client_id
itisworks.cached forever).
Also, keep in mind thatdiscord_client_secret
anddiscord_bot_token
will be empty when you load the config again for security reasons, they are stored in the server so don't worry!
Next Step: Logging Jobs: Navio Integration