Enhance Discord's automod with image recognition - Works on emojis, reactions, stickers, and more!
Important
The production bot does not apply automod rules to admins/users with manage server, similar to standard automod
- Create a discord bot with the following permissions (Detailed guide from Discord.JS):
- 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)
- Add the bot to your server
- Clone this repository (
git clone https://github.com/SomeAspy/AOCR
) - Set configs in
config/config.json
(copyconfig.example.json
and rename the copy toconfig.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
)
- Install packages using a node package manager (I suggest PNPM):
pnpm i
- Build:
pnpm build
- Run:
pnpm start