This is a Discord bot that watches an ARK tribe log channel and sends alerts when a tek sensor message is detected and or a structure is destroyed.
It looks for messages that contain certain words and patterns so you can always be on high alert while using tribelog hook.
Have fun with sleepless nights :)
- Detects raid alerts from ARK tribe logs
- Extracts the base location (for example MAINWALL)
- Extracts the attacker type (enemy dino or enemy player)
- Pings a Discord role
- Sends 3 alert messages with the image (prevents missing alerts)
- Keeps a 30 minute rolling raid counter
- Shows danger level using emoji bar (
⚠️ ⚠️ ⚠️ for low count, 🔥🔥🔥 for medium, 💀💀💀 for high)
- Detects when structures are being broken
- Extracts which map
- Extracts who destroyed the structure
- Extracts what is destroyed
- Sends an alert with emoji bar when threshold is reached
- Keeps a 30 minute rolling structure destruction counter
- Only sends a message when the counter reaches or exceeds DESTRUCTION_ALERT_THRESHOLD (defaults to 5)
- Sends the image attachment when 15+ structures have been destroyed
- Python 3.10 or newer
- A Discord bot token Learn how to:
- The tribe log must be sent into a Discord channel (by another bot tribeloghook ark bot)
- Optional for screen monitoring: Tesseract OCR installed on the PC that runs the bot
python -m pip install discord.py python-dotenv
For the screen tribelog monitor, also install:
python -m pip install pillow pytesseract
Install the Tesseract OCR app too. On Windows, the common installer is from UB Mannheim: https://github.com/UB-Mannheim/tesseract/wiki
In the same folder as RaidBot.py, create a file named:
.env
Put this inside (replace the numbers with your own):
Create your discord bot token here
DISCORD_TOKEN=YOUR_BOT_TOKEN
TRIBE_LOG_CHANNEL_ID=123456789012345678 (Required - Right-click on the TribeLog hook channel and copy the ID)
ALERT_CHANNEL_ID=123456789012345678 (Required - Right-click on the ALERT channel and copy the ID)
TRIBELOG_BOT_ID=123456789012345678 (Required - Right-click on the TribeLog bot in Discord and copy the ID)
ROLE_ID=123456789012345678 (Required - Right-click on the role in Discord and copy the ID)
BASE_MAPS= (Optional - default is empty: if it is empty sends alerts when ANY map is being attacked type any of the island names for it to recognize which island it has to keep watch for: The Island,Abberation,Genesis 2,Genesis 1,Ragnarok,The Center,Valguero,Crystal Isles,Lost Island,etc.. (Comma seperated: TheIsland,Abberation,TheCenter))
DESTRUCTION_ALERT_THRESHOLD=5 (Optional - defaults to 5 if not set)
NOT_MAIN_MAP_DESTRUCTION_THRESHOLD=25 (Optional - defaults to 25 if not set)
DISABLE_NOT_MAIN_MAP_ALERTS=false (false by default turn on true if u dont want to be notified when another map than your BASE_MAP(S) are/is being attacked)
DISABLE_SENSOR_ALERTS=false (Optional - set to 'true' to disable raid alerts)
DISABLE_DESTRUCTION_ALERTS=false (Optional - set to 'true' to disable destruction alerts)
DEBUG=false (Optional - set to true for verbose logs)
SCREEN_LOG_REGION= (Optional - x,y,width,height for the screen OCR box. Empty means the bot watches the middle tribe log area automatically)
SCREEN_LOG_INTERVAL_SECONDS=3 (Optional - seconds between OCR scans)
SCREEN_LOG_SCREENSHOT_INTERVAL_SECONDS=60 (Optional - seconds between screenshot posts)
SCREEN_LOG_MODE=ocr (Optional - standalone screen monitor mode: ocr or screenshot)
SCREEN_LOG_OVERLAY=true (Optional - shows a cyan overlay around the watched screen area)
SCREEN_LOG_CHANNEL_ID=123456789012345678 (Optional - channel where the standalone screen monitor posts OCR lines. Defaults to TRIBE_LOG_CHANNEL_ID)
SCREEN_LOG_DISCORD_TOKEN=YOUR_SECOND_BOT_TOKEN (Optional - token for the standalone screen monitor. Defaults to DISCORD_TOKEN)
TESSERACT_CMD= (Optional - full path to tesseract.exe if Windows cannot find it automatically)Put a .png image named:
alert.png
in the same folder as the bot.
python bot.pyIf it works, you should see:
Logged in as ARK Raid Bot
Debug mode gives you detailed logs for troubleshooting. You can enable it in two ways:
Option 1: Using .env file
Add this to your .env file:
DEBUG=trueOption 2: Command line argument
Run the bot with the --debug flag:
python RaidBot.py --debug
When debug mode is enabled, you'll see:
- Detailed extraction info (maps, locations, destroyed items, raiders)
- Destruction counters
- Full stack traces if errors occur
- Sensor and destruction alert details
This mode watches the tribe log directly on the screen, reads the text with OCR, and posts new lines into a Discord text channel.
Run only the screen monitor, without the raid alert bot:
python screen_monitor_bot.py
This starts screen OCR automatically and stops when you close the terminal with Ctrl+C. If you want the normal raid bot and the screen monitor running at the same time, use SCREEN_LOG_DISCORD_TOKEN with a second Discord bot token so each process has its own bot login.
To make the standalone screen monitor post tribe log screenshots instead of OCR text, set:
SCREEN_LOG_MODE=screenshotStart it in the current channel:
!screenlog_start
Start it in another channel:
!screenlog_start #tribelog-ocr
Stop it:
!screenlog_stop
Start screenshot posting in the current channel:
!screenlog_screenshot_start
Start screenshot posting in another channel:
!screenlog_screenshot_start #tribelog-screenshots
Stop screenshot posting:
!screenlog_screenshot_stop
Check where it is watching:
!screenlog_status
Check where screenshot posting is watching:
!screenlog_screenshot_status
Set the watched rectangle until the bot restarts:
!screenlog_region 760 210 420 660
The default rectangle is centered around the ARK tribe log panel, like the screenshots. If the cyan overlay is slightly off, use !screenlog_region x y width height, then stop and start the monitor again.
The bot reads every message in the tribe log channel.
If it finds:
[2-9 0:20:37][Gen2] <<ALERT>> MAINWALL <<ALERT>></> triggered by <RichColor Color="0, 0.5, 0.25, 1">by an enemy dino</>.
Or something like:
[2-10 22:14:07][Gen2] Arthropluera - Lvl 297 (Tribe of sleebex) destroyed your 'Tek Generator (Locked) '!For the tek sensor it will send:
- A role ping
- The Map (gen2)
- The location (MAINWALL)
- The attacker (enemy dino)
- The raid counter will go up once
- The alert image gets sent.
For the destroyed structures it will send:
- A role ping
- The Map (gen2)
- The Destroyed structure
- The item/dino/player that destroyed it
- The Destroyed counter will go up by 1 (Only sends a message when the counter reaches or exceeds DESTRUCTION_ALERT_THRESHOLD)
- Make sure the bot role is above the role it is pinging
- Give the bot permission to read messages, send messages, and mention roles
This bot ignores other bots except the tribe log bot you define in the .env file. This prevents spam loops and false alerts.
- Go to: https://discord.com/developers/applications
- Click New Application → name it ARK Raid Bot
- Go to Bot → Add Bot
- Copy the Bot Token (And add this to your .env file)
Message Content Intent
Server Members Intent
- Go to OAuth2 → URL Generator
This opens the next part where you select:
- Send Messages
- Mention Everyone
- Read Message History
Copy the generated link → open it → add to your server.
- Nothing really.
Use this for personal servers only. You are responsible for how you use it.


