Commit 7c1c84a 1 parent 205cd02 commit 7c1c84a Copy full SHA for 7c1c84a
File tree 2 files changed +10
-0
lines changed
src/discord-cluster-manager/cogs
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ psycopg2-binary
9
9
yoyo-migrations
10
10
ruff
11
11
pre-commit
12
+ better_profanity
12
13
13
14
# api
14
15
fastapi [all ] # install all to avoid random bugs
Original file line number Diff line number Diff line change 5
5
from bot import ClusterBot
6
6
7
7
import discord
8
+ from better_profanity import profanity
8
9
from consts import SubmissionMode
9
10
from discord import app_commands
10
11
from discord .ext import commands
@@ -190,6 +191,14 @@ async def _validate_input_file(
190
191
)
191
192
return None
192
193
194
+ if profanity .contains_profanity (script .filename ):
195
+ await send_discord_message (
196
+ interaction ,
197
+ "Please provide a non rude filename" ,
198
+ ephemeral = True ,
199
+ )
200
+ return None
201
+
193
202
# load and decode
194
203
try :
195
204
return (await script .read ()).decode ("utf-8" )
You can’t perform that action at this time.
0 commit comments