A full-featured Discord-based administration bot and in-game command monitor for DCS World Dedicated Server. This system links your DCS server with Discord and in-game chat, allowing powerful remote control, player moderation, logging, and mission management. The Bot should be installed and configured on your DCS server
- Windows-based DCS Dedicated Server
- Python 3.10+ (if using python version)
- Discord account with server management rights
- DCS SimpleRadio Standalone (SRS) (optional)
Install via:
pip install -r requirements.txt- Visit the Discord Developer Portal
- Create a new application and add a bot
- Enable intents under the Bot tab:
- Message Content Intent
- Server Members Intent
- Under OAuth2 โ URL Generator:
- Scopes:
bot,applications.commands - Bot Permissions:
Send Messages,Embed Links,Attach Files,Manage Messages,Use Slash Commands
- Scopes:
- Invite the bot to your server using the generated URL
- Copy the bot token and your server (guild) ID
- Unzip the last released it should contain 2 folders
- Hooks , ensure discord_admin_allinone_hook.lua is in Hooks folder
- Discord_Admin_Bot folder , where you will found DCSAdminBot.exe and run_dcs_bot.ps1 (those script should work in any place on your server but recommended to keep everything inside this folder where all files and logs will be created/updated)
- copy all folder into your C:\Users<user>\Saved Games\DCS\Scripts
- set up all you env. variables
Set the following (in the run_dcs_bot.ps1):
Set Discord Server, Bot
$env:DISCORD_BOT_TOKEN = "your_token_here"
$env:DISCORD_GUILD_ID = "your_guild_id"
Set Roles, Users
$env:DISCORD_ADMIN_USER_IDS = "" # optional with Roles can be empty<-- Replace with your admin Discord user IDs (comma-separated)
$env:DISCORD_ADMIN_ROLE_NAMES = "Server Admins" # <-- Replace with your admin role names (comma-separated)
Set channel IDs
$env:DISCORD_UPLOAD_CHANNEL_ID = "123456789012345678" # <-- Replace with your upload channel ID
$env:DISCORD_FFIRE_ALERT_CHANNEL_ID = "123456789012345678" # <-- Replace with your Friendly Fire Alert channel ID
$env:DISCORD_STARTUP_GREETING_CHANNEL_ID = "123456789012345678" # <-- Replace with your startup greeting channel ID
$env:DISCORD_STATUS_UPDATE_CHANNEL_ID = "123456789012345678" # <-- Replace with your status update channel ID
Set DCS, SRS path
$env:DCS_SERVER = "C:\Path\To\DCS-Server"
$env:DCS_SAVED_GAMES = "C:\Users\<user>\Saved Games\DCS"
$env:SRS_SERVER = "C:\Path\To\SR-Server.exe"
$env:SRS_SERVER_CFG = "C:\Path\To\server.cfg"
set Path to exe
Start-Process -FilePath "C:\Users\<user>\Saved Games\DCS\Scripts\Discord_Admin_Bot\DCSAdminBot.exe" -NoNewWindow -WaitScripts\Discord_Admin_Bot\โ text command files, & LogsScripts\Hooks\- Lua hookMissions\โ Mission files and save folders (foothold)Config\serverSettings.luaโ Server config file
You can use the template script:
.\run_dcs_bot.ps1This script sets up environment variables and runs the bot in the background (no window pop-up if configured via Task Scheduler).
To launch the bot automatically when the server starts:
-
Open Task Scheduler (
taskschd.msc) -
Click Create Task
-
Under General tab:
- Name:
DCS Admin Bot - Select Run whether user is logged on or not
- Check Run with highest privileges
- Name:
-
Under Triggers tab:
- Click New
- Begin the task:
At startup - Click OK
-
Under Actions tab:
-
Click New
-
Action:
Start a program -
Program/script:
powershell.exe -
Add arguments (replace path as needed):
-WindowStyle Hidden -ExecutionPolicy Bypass -File "C:\Users\USERNAME\Saved Games\DCS.dcs_serverrelease\run_dcs_bot.ps1"
-
-
Click OK, enter Server Admin credentials when prompted.
- Make sure
run_dcs_bot.ps1is present at the specified path. - The script will run silently without opening a PowerShell window.
- You can confirm operation via
dcs_admin_bot.logor the botโs presence in Discord.
Use in the in-game chat (coalition or global):
| Command | Description |
|---|---|
!addadmin [PlayerName] |
Promote a connected player to admin |
!removeadmin [PlayerName] |
Remove admin rights from a connected player |
!ban [PlayerName] duration reason |
Ban player (duration in seconds, 0 = permanent) |
!unban [PlayerName] |
Remove a player from banlist |
!pause / !unpause |
Pause/unpause the mission |
you can create this file in Discord_Admin_Bot folder manually and add UCID of player to give admin right and use in-game command or use !addadmin command: admin_ucids.txt
When player are banned or unbanned , it update the same list used by Discord bot, so all player are ban/uban both way
Use Discord slash commands for bot control. Admin-only commands are restricted via role/user ID config.

/uploadmission๐ค Upload a.mizfile to server (requires upload channel)/listmissions๐ List missions on server/loadmission number๐ Load mission by number/missioninfoโน๏ธ Show current mission status
/pauseโธ๏ธ Pause mission/unpauseโถ๏ธ Unpause mission/restartmission๐ Restart current mission/restart_dcs_server๐ ๏ธ Kill & restart DCS Server/dcsupdateโฌ๏ธ Update DCS via DCS_updater.exe (it should bypass UAC prompt and launch silent update, also MissionScripting.lua is updated before server restart) Not fully tested with real update , No DCS update form ED at the time The bot is released/update_missionscripting๐ UpdateMissionScripting.lua(it try to found MissionScripting.lua (must be desanitized) in Saved Game\Scripts and copy to Server installation Scripts folder)/restart_srs๐ Restart SRS server (Bug note: after restart SRS is running as service but no SRS GUI shows up)
/dcsplayers๐งโโ๏ธ Recent unique players/dcsconnections๐ Show recent player connections/dcsban player duration reason๐ซ Ban a player/dcsunban playerโ Unban a player/dcsbanlist๐ View active banlist/playerstats๐ Detailed player session stats/footholdstats๐ช Extract killboard stats from Foothold save
/status๐ก Live server & mission status/help๐ List all bot commands
The bot uses and maintains the following files:
| File | Purpose |
|---|---|
player_log.csv |
Logs player joins/leaves and events |
banlist.txt |
Persistent bans |
kickqueue.txt |
Temporary kicks (via Discord) |
chatcmd.txt |
Queue for in-game bot chat messages |
missioncmd.txt |
Discord โ DCS command channel |
missioninfo.txt, missionstatus.txt, missionlist.txt |
Status and mission details |
friendlyfire.txt |
Friendly fire log |
admin_ucids.txt |
Admin list for in-game chat command |
If you use the Foothold Campaign, you can run /footholdstats to generate a leaderboard from any .lua save file in the Missions/Saves directory.
- Friendly fire watcher with Discord alerts (not tested)
- Auto-update mission list (it does NOT update serverSettings so list is not persitente after restart of DCS)
- UCID-based player management
- Supports both role-based and user ID-based admin permission checks
- DCS server auto-restart on update (possible bug)
