mirror of
https://github.com/Saeraphinx/anti-scam-ocr.git
synced 2026-10-15 20:16:44 -05:00
A Discord bot that uses Tesseract to detect and block scam messages containing images with text.
- TypeScript 97.2%
- Dockerfile 2.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| LICENSE.txt | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
anti-scam-ocr
A Discord bot that uses Tesseract to detect and block scam messages containing images with text.
Using Docker Compose
Create a docker-compose.yml file with the following content:
version: "3.8"
services:
anti-scam-ocr:
image: ghcr.io/saeraphinx/anti-scam-ocr:latest
container_name: anti-scam-ocr
restart: unless-stopped
volumes:
- ./config:/app/config
environment:
- DISCORD_TOKEN: "your-discord-bot-token"
- ALLOWED_CHANNELS: "1234,5678"
- DISALLOWED_CHANNELS: "1234,5678"
- IS_WHITELIST: "true"
- LOG_CHANNEL: "optional-log-channel-id"
- SHOULD_DELETE: "true"
- SHOULD_TIMEOUT: "true"
- SHOULD_KICK: "false"
- TIMEOUT_DURATION: "7d"
- SCAN_EVERYTHING: "true"
- TRIGGERS_BEFORE_ACTION: "1"
Environment Variables
Example .env file
# Discord bot token
DISCORD_TOKEN=""
# comma separated list of allowed channel IDs
ALLOWED_CHANNELS=""
# comma separated list of disallowed channel IDs
DISALLOWED_CHANNELS=""
# whether to use the allowed channels or disallowed channels variable
IS_WHITELIST="true"
# channel ID for logging detected messages
LOG_CHANNEL=""
# whether to delete messages containing banned words
SHOULD_DELETE="true"
# whether to kick users for sending banned words
SHOULD_KICK="false"
# whether to timeout users for sending banned words
SHOULD_TIMEOUT="true"
# duration of timeout for users who send banned words (see ms library for format)
TIMEOUT_DURATION="7d"
# whether to scan messages from all users, including bots & users that the bot cannot moderate
SCAN_EVERYTHING="true"
# number of triggers before punishment action is taken (timeout/kick)
TRIGGERS_BEFORE_ACTION="1"