Skip to content

Latest commit

 

History

History
74 lines (66 loc) · 4.93 KB

README.md

File metadata and controls

74 lines (66 loc) · 4.93 KB

Bot Service

This is the Discord bot implementation, the one that's providing all the commands and embeds that are displayed in your Discord server (for the Discord-less implementation, see below).

Configuration

The configuration is quite basic, please check out the installation guide in the main README. After you have installed DCSServerBot, a file named config/services/bot.yaml will be there for you to amend to your requirements:

token: SECRET DISCORD TOKEN COMES HERE          # Your TOKEN, as received from the discord developer portal.
owner: 1122334455667788                         # The ID of your bot user. Right click, select "Copy User ID".
automatch: true                                 # Use the bots auto-matching functionality (see below), default is true.
autoban: false                                  # Use the bots auto-ban functionality (see below), default is false.
autorole:                                       # Automatically give roles to people, depending on conditions (see below). The roles need to be set up in your Discord server.
  on_join: Member                               # Give anyone the "Member" role, if they join your Discord.
  linked: DCS                                   # Give people that get linked the DCS role.
  online: Online                                # Give people that are online on any of your servers the "Online" role.
no_dcs_autoban: false                           # If true, people banned on your Discord will not be banned on your servers (default: false)
message_ban: User has been banned on Discord.   # Default reason to show people that try to join your DCS servers when they are banned on Discord.
message_autodelete: 300                         # Most of the Discord messages are private messages. If not, this is the timeout after that they vanish. Default is 300 (5 mins). 
admin_channel: 1122334455667788                 # Optional: Central admin channel (see below).
reports:
  num_workers: 4                                # Number of worker threads to be used for any reports generated by the bot. Default is 4.
  cjk_font: KR                                  # Optional: You can specify a CJK font to be used in your reports.
discord_status: Managing DCS servers ...        # Message to be displayed as the bots Discord status. Default is none.
audit_channel: 88776655443322                   # Central audit channel to send audit events to (default: none)
roles:                                          # Roles mapping. The bot uses internal roles to decouple from Discord own role system.
  Admin:                                        # Map your Discord role "Admin" to the bots role "Admin" (default: Admin)
  - Admin                                       
  Alert:                                        # Optional Alert role. Default is DCS Admin. Would be pinged on server crashes and low performance
  - DCS Admin
  DCS Admin:                                    # Map your Discord role "Moderator" and "Staff" to the bots "DCS Admin" role (default: DCS Admin)
  - Moderator
  - Staff
  GameMaster:                                   # Map the GameMaster role to anybody with the Staff role in your Discord.
  - Staff
  DCS:                                          # Map the bots DCS role to everyone in your discord. Only everyone needs the leading @!
  - @everyone

Caution

Never ever share your Discord TOKEN with anyone. If you plan to check in your configuration to GitHub, don't do that for the Discord TOKEN. GitHub will automatically revoke it from Discord for security reasons.

Tip

The bot will remove the Discord token on the first startup from your bot.yaml.
If you want to replace the token later, just re-add the line into your bot.yaml and DCSServerBot will replace the internal token with this one.

Non-Discord Installations

DCSServerBot is made for Discord and I highly recommend using it with that. Nevertheless, there are people that do not want to use Discord or are not allowed to do so. Thus, I have implemented a version that can run without it.

As your only interface to DCSServerBot-commands is the in-game chat then and as only approved / verified people can run them, you need to provide some kind of role-mapping.

Configuration

Your bot.yaml might look like this:

no_discord: true
roles:
  Admin:
    - aabbccddeeffgghhiijjkkll11223344  # UCID(s) of the players, that should get the Admin role
  DCS Admin:
    - aabbccddeeffgghhiijjkkll11223344
    - 998877665544332211aabbccddeeffgg  # UCID(s) of the players, that should get the DCS Admin role

The bot will then start without any Discord integration and allow the players listed in your bot.yaml to run the respective commands that are allowed for this role.

Important

You might get some warnings and errors because of missing information like channels etc. in your bot. And you can not use any plugin that is only meant to display data in Discord like FunkMan or Greenieboard.