This script monitors a file named miscmod_reports.dat and sends a report-log to a specified Discord webhook. The script is designed to format the message and mention an admin role.
- Monitors
miscmod_reports.dat. - Formats the report with details about the reporter, reported player, and reason.
- Sends the report to a specified Discord webhook.
- Mentions an admin role in each message.
- Remembers the last processed line to avoid duplicate messages after restarting.
-
Install dependencies:
- This script requires the
requestslibrary. Install it using pip:
pip install requests
- This script requires the
-
Configure the script:
- Open
report.pyand replaceyour_webhook_url_herewith your Discord webhook URL. - Replace
admin_id_herewith the ID of the admin role you want to mention.
- Open
-
Run the script:
python report.py
-
Output:
- It will monitor
miscmod_reports.datand send new reports to the specified Discord webhook.
- It will monitor