https://github.com/someaspy/aocr
Enhance Discord's automod with image recognition - Works on emojis, reactions, stickers, and more!
https://github.com/someaspy/aocr
discord-bot discord-js ocr tesseract typescript
Last synced: 3 months ago
JSON representation
Enhance Discord's automod with image recognition - Works on emojis, reactions, stickers, and more!
- Host: GitHub
- URL: https://github.com/someaspy/aocr
- Owner: SomeAspy
- License: agpl-3.0
- Created: 2023-10-30T22:09:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-01T03:45:50.000Z (10 months ago)
- Last Synced: 2025-04-12T07:51:59.820Z (3 months ago)
- Topics: discord-bot, discord-js, ocr, tesseract, typescript
- Language: TypeScript
- Homepage:
- Size: 19.9 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: .github/readme.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# AOCR
> Enhance Discord's automod with image recognition - Works on emojis, reactions, stickers, and more!

## Invite
> [!IMPORTANT]
> The production bot does not apply automod rules to admins/users with manage server, similar to standard automod## To Host Yourself
1. Create a discord bot with the following permissions ([Detailed guide from Discord.JS](https://discordjs.guide/preparations/setting-up-a-bot-application.html)):
- ***ENABLE THE MESSAGE CONTENT INTENT***
- Send Messages (To send messages to the automod channel)
- Manage Messages (To delete offending messages)
- Manage Server (To view AutoMod rules)
- Read Messages/View Channels (To view messages and images contained within)
- Moderate Members (To apply moderation actions to members)
2. Add the bot to your server
3. Clone this repository (`git clone https://github.com/SomeAspy/AOCR`)
4. Set configs in `config/config.json` (copy `config.example.json` and rename the copy to `config.json`)
- `DiscordToken`: This will be your bots Discord Token.
- `Workers`: The amount of workers the bot will have for OCR. Each worker takes about 100mb RAM. (Default: `5`)
- `ApplyToModerators`: Whether to apply AOCR detection to admins and members with manage server. (Default: `false`)
- `OnlyDelete`: This will only delete messages instead of applying all automod rules. (Default: `false`)
- `CheckEmojis`: Check emojis with OCR. This requires processing **EVERY** message with regex. (Default: `false`)
- `CheckReactions`: Check reactions with OCR. (Default: `true`)
- `CheckStickers`: Check stickers with OCR. (Default: `true`)
5. Install packages using a node package manager (I suggest [PNPM](https://pnpm.io/)): `pnpm i`
6. Build: `pnpm build`
7. Run: `pnpm start`### Powered by [Tesseract.js](https://tesseract.projectnaptha.com/)
#### Training data provided by