Technically Automod
Privileged intent justification for Python-based discord bots.
technically-automod is an automod cog for major Python-based Discord API frameworks (Discord.py, Disnake, Nextcord).
Installing
technically-automod can be installed with the command
# Linux
python3 -m pip install -U technically-automod
# Windows
python -m pip install -U technically-automod
To install the development version of the library directly from source:
$ git clone https://github.com/nwunderly/technically-automod
$ cd technically-automod
$ python3 -m pip install -U .
To ensure version compatibility with your Discord API library:
# discord.py
pip install technically-automod[discord.py]
# disnake
pip install technically-automod[disnake]
# nextcord
pip install technically-automod[nextcord]
Loading the extension
You can load technically-automod the same way you load any other extension. The library will automatically detect which Discord API library you have installed, and choose the correct extension to load.
# discord.py
await bot.load_extension("technically_automod")
# disnake & nextcord
bot.load_extension("technically_automod")
If you have multiple Discord API libraries installed, the above method will raise an ImportError exception. If this happens, you should load the extension based on the library you're using:
# discord.py
await bot.load_extension("technically_automod.discordpy")
# disnake
bot.load_extension("technically_automod.disnake")
# nextcord
bot.load_extension("technically_automod.nextcord")
You can also add the Cog manually:
# Auto-detect library
from technically_automod import TechnicallyAutomodCog
await bot.add_cog(TechnicallyAutomodCog(bot)) # if using discord.py
bot.add_cog(TechnicallyAutomodCog(bot)) # if using disnake or nextcord
# discord.py
from technically_automod import DiscordpyAutomodCog
await bot.add_cog(DiscordpyAutomodCog(bot))
# disnake
from technically_automod import DisnakeAutomodCog
bot.add_cog(DisnakeAutomodCog(bot))
# nextcord
from technically_automod import NextcordAutomodCog
bot.add_cog(NextcordAutomodCog(bot))
Configuration
When loaded, the automod cog will look for a file called "config.json" in the Python process's working directory. An example config file is provided in this repository.
The config should be structured as a JSON object with two fields:
guildsshould be a list of guild IDs to do automoderation in.rulesshould be a list of rules, where each rule consists of a name, a rule type, actions to perform on match, and (if necessary) a list of items to match on.
Disable Automod
Automod will do nothing if:
- There is no
config.jsonfile. config.jsonis empty.- The
guildsfield is missing, or contains an empty list:[] - The
rulesfield is missing, or contains an empty list:[]
Rule Types
The type field should be a string defining the rule type.
- Rule type
phishingwill use the FishFish database to detect phishing links. The cog will update the phishing domain list every hour if the configuration contains a phishing rule. - Rule type
wordswill match whole words in the message content. - Rule type
substringwill detect the matches anywhere in the message content, including in the middle of words. - Rule type
regexwill use Python'sre.searchfunction to find regex pattern matches in the message content.
Note: words, substring, and regex rules are all case-insensitive when matching.
Check
The check field should be a list of strings indicating what the rule should apply to.
- If
messageis in the list, the rule will be used to check the content of messages. This requires themessage_contentintent. - If
profileis in the list, the rule will be used to check member username, global display name, and nickname. This requires themembersintent.
Note: you can find more info on privileged intents here.
Match List
The match field in each rule should be a list of strings defining the words, substrings,
or regex patterns to match on. The phishing rule should not have a match field.
Actions
The actions field should be a list of actions to perform if a match is detected. The options are:
delete- Delete the message.kick- Kick the user from the server.ban- Ban the user from the server.
Note: if "kick" and "ban" are both listed, the one listed first will be performed and the next will be ignored.
Examples
Example config.json file:
{
"guilds": [],
"rules": [
{
"name": "Phishing Detection",
"type": "phishing",
"check": ["message"],
"actions": ["delete", "kick"]
},
{
"name": "Bad Word Detection",
"type": "words",
"check": ["message", "profile"],
"match": ["heck", "frick"],
"actions": ["delete", "kick"]
},
{
"name": "Brainrot Detecton",
"type": "substring",
"check": ["message"],
"match": ["67"],
"actions": []
},
{
"name": "Spam Detection",
"type": "regex",
"check": ["message"],
"match": ["(?:\w+){30,}"],
"actions": ["delete"]
}
]
}
Justifying Privileged Intents
This automod cog supports automatic moderation of message content (this requires the Message Content privileged intent) and members' usernames, display names, and nicknames (this requires the Guild Members privileged intent).
The cog supports several things not available in stock Discord automod:
- Detection of phishing links using the FishFish API.
- Regex rules use the Python
remodule, which supports lookaheads and lookbehinds, something that Discord's native automod does not support.
I believe the functionality provided by this library should be sufficient justification to get a bot approved for access to either, or both, of those intents.
Why?
While this library is completely functional, I created it more as a form of protest than out of a desire to undermine or skirt around Discord's rules. It's a pretty barebones and limited automod cog, but it also contains the functionality required to justify approval for the Message Content and Guild Members intents.
On June 10, 2026, Discord announced a change to their Privileged Intents system: apps accessible to more than 10,000 users now have to apply and be approved for access to privileged intents. There is a 90-day deadline to apply. If Discord doesn't consider your use case for privileged intents to be valid (for example, message commands), this means you have 90 days (plus however long it takes Discord to review), to update your bot to make it work without access to privileged intents.
Previously, bots that had been added to more than 100 servers would have to be approved for access to these intents. This makes sense, as there are bots that are in millions of servers, with access to tens of millions of users. These applications, often owned by businesses whose sole purpose is to run these services for profit, should be scrutinized to ensure that they are not abusing the data of their users. When Discord bots are added to hundreds, thousands, or millions of servers, they are effectively public web services.
This change adjusts the requirement to also include bespoke, private bots created for large communities. The custom moderation bot in a single server with 10,000 people is not the same threat to user data that a large, public bot is.
With this change, Discord is stating that message commands are not acceptable for large communities' custom bots. Such bots, if they don't have another "valid" use case for message content, must move to slash commands or they will cease to function in September.
As an admin of a large community on Discord, my team and I rely heavily on custom bots to help us with moderation. We also have several bots that exist solely to help create a fun environment in our community. In total, we have NINE bots (owned by two people) that exist solely for this single community. That's nine bots we have to figure out how to justify, or rewrite, with only a few months' notice. That's a huge lift for a handful of people, all of whom have day jobs.
This change forces a large amount of completely unnecessary bureaucratic nonsense on the moderation teams of large communities, as well as forcing them to rewrite custom bots on short notice or lose the software they depend on to help keep their communities safe and enjoyable. Bots that nearly every large community has, because Discord's built-in moderation tools are not sufficient for the needs of these large communities.
I created this library because I strongly believe that Discord has no business policing the tools that moderation teams create to help them run their communities in this way. Discord should be making it easier to manage large communities, not more difficult.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file technically_automod-0.2.0.tar.gz.
File metadata
- Download URL: technically_automod-0.2.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.4 Linux/7.0.11-200.nobara.fc43.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
145b178a315cce2aabe7b71989d3e6bc7cc31dd45915a1d1a3e43561f5eb1b8a
|
|
| MD5 |
11735b9d97e96017b80990158fd30548
|
|
| BLAKE2b-256 |
6b8bf384a6e7f352ce089c188bc7fe37329aab3efcb147e0f1a54153e84ae8b9
|
File details
Details for the file technically_automod-0.2.0-py3-none-any.whl.
File metadata
- Download URL: technically_automod-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.4 Linux/7.0.11-200.nobara.fc43.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ba976cf475088bf30b8352303bb1f0e5e1e358425de16cb21a4d76296d174bd
|
|
| MD5 |
06663287adda54ebd279f4c6e07294a8
|
|
| BLAKE2b-256 |
c4046c1e548d4bde654a5c8159fbe5aba74eb7d386bc4082360fbd1adf03753f
|