Enabling the Discord Bot - JustaPenguin/assetto-server-manager GitHub Wiki

The server manager Discord bot (originally developed by community member @Cheesegrits) is capable of delivering messages to a certain Discord channel to notify users of events starting, being scheduled and more. If you'd like to set up a Discord notification bot on your sever, this guide is for you!

We're assuming that you have Manage Server and Manage Roles permissions for the Discord Server you want to add the bot to.

Creating the Bot

The first step is to make the bot on your Discord server.

  1. Log in to the Discord Website
  2. Navigate to the Application Page
  3. Click the New Application button
  4. Give the application a name and click Create. Probably best to call it something recognizable like AC Server Manager
  5. Navigate to the Bot tab and click the Add Bot button
  6. Click the Copy button to copy the Bot user token to your clipboard, we're going to need it soon!

Setting Up the Bot in Server Manager

Now we can add the bots info to your Server Manager instance!

  1. Navigate to Server -> Options in Server Manager and scroll down to the Discord Integration section
  2. Paste the Bot user token into the Discord API Token field
  3. Open your Discord client
  4. Navigate to User Settings -> Appearance and in the advanced section enabled Developer Mode
  5. Right click the Discord Channel that you would like your Bot to post to and click Copy ID
  6. Paste the Channel ID into the Discord Channel ID field
  7. Optional: If you'd like the Discord Bot to mention a certain role in the Discord server whenever it posts, add the ID of that role to the Discord Role ID field. You can get a Role ID by navigating to Server Settings -> Roles then right click on the role and Copy ID
  8. Optional: If you'd like users on your Discord to be able to "subscribe" to a role in order to be mentioned by the Bot, you can add the name of the command for them to run in order to do that. For example if you add the role ID 555 (say this role is called racers) to the Discord Role ID field and the command string notify to the Discord Role command, then users that type !notify in the channel will be given the racers role and subsequently be mentioned by the Bot via @racers whenever it posts
  9. Optional: You can now configure a few extra options for the notification bot, Notification Reminder Timers, Show Password in Notifications and Notify When Scheduled. These options should be pretty self-explanatory
  10. Save the server options

Inviting the Bot to the Discord Server

Now you just need to invite the bot to your server!

  1. Go back to the Bot page where you got the Bot user token from
  2. Go to URL Generator under the OAuth2 tab
  3. Tick the bot checkbox under scopes
  4. Tick the permissions required for the bot. It definitely needs to be able to Read Messages/View Channels, Embed Links and Send Messages. You may also want it to be able to Manage Roles if you followed the optional steps to enable users to subscribe to a role via the bot
  5. Now the resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”

And that's it, you're done! Try starting an event to make sure your bot posts to the channel (it may take a few seconds)