Skip to content

Instantly share code, notes, and snippets.

@uchks
Created April 23, 2023 18:43
Show Gist options
  • Save uchks/1322a1e81af2404608665f1fd101cb57 to your computer and use it in GitHub Desktop.
Save uchks/1322a1e81af2404608665f1fd101cb57 to your computer and use it in GitHub Desktop.
automod rules I've made.

Markdown Links Automod Rule

this regex blocks markdown links.
\[[^\]]+\]\([^)]+\)

URL Encoding Automod Rule

this regex matches % followed by two-digit hexadecimal codes, mostly resemblant of URL encoded characters.
%[0-9A-Fa-f]{2}

Discord Invite Links Automod Rule

this regex matches any discord invite link, server url, or oauth2 authorization url, with support for both discord.com and discord.gg domains.
(?i)discord(?:app)?\.(?:com|gg)/(?:friend-)?invite/[a-z0-9-_]+|discord\.gg/[a-z0-9-_]+|discord(?:app)?\.com/(?:oauth2/authorize[\S]*|servers/[^/\s]+(?:/\S*)?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment