File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1
1
aiohttp >= 3.6.2
2
2
async-timeout >= 3.0.1
3
3
attrs >= 19.3.0
4
- beautifulsoup4 >= 4.9.1
4
+ beautifulsoup4 >= 4.10.0
5
5
bs4 >= 0.0.1
6
- certifi >= 2020.6.20
6
+ certifi >= 2021.5.30
7
7
chardet >= 3.0.4
8
- discord.py >= 1.7.2
8
+ discord.py >= 1.7.3
9
9
idna >= 2.10
10
10
lavalink >= 3.1.2
11
11
multidict >= 4.7.6
@@ -19,3 +19,5 @@ urllib3>=1.25.10
19
19
websockets >= 8.1
20
20
yarl >= 1.5.1
21
21
mysql-connector-python >= 8.0.21
22
+ alt-profanity-check == 1.1.1
23
+ protobuf >= 3.20.2 # not directly required, pinned by Snyk to avoid a vulnerability
Original file line number Diff line number Diff line change @@ -198,9 +198,11 @@ async def debug(ctx):
198
198
inline = True )
199
199
embed .add_field (name = "Bug Report:" , value = "[Issues](https://github.com/RedCokeDevelopment/Teapot.py/issues)" ,
200
200
inline = True )
201
- embed .add_field (name = "Website:" , value = "[Website](https://teapot.page )" , inline = True )
201
+ embed .add_field (name = "Website:" , value = "[Website](https://teapot.bot )" , inline = True )
202
202
embed .add_field (name = "Links" ,
203
- value = "[Support Discord](https://discord.gg/7BRGs6F) | [Add bot to server](https://discordapp.com/oauth2/authorize?client_id=669880564270104586&permissions=8&scope=bot) | [Repository](https://github.com/RedCokeDevelopment/Teapot.py)" ,
203
+ value = "[Support Discord](https://discord.gg/7BRGs6F) | [Add bot to server]" +
204
+ "(https://discordapp.com/oauth2/authorize?client_id=669880564270104586&permissions=8&scope=bot) | " +
205
+ "[Repository](https://github.com/RedCokeDevelopment/Teapot.py)" ,
204
206
inline = False )
205
207
embed .set_footer (text = f"{ teapot .copyright ()} | Code licensed under the MIT License" )
206
208
# embed.set_image(url="https://user-images.githubusercontent.com/43201383/72987537-89830a80-3e25-11ea-95ef-ecfa0afcff7e.png")
Original file line number Diff line number Diff line change 1
1
import json
2
2
import teapot
3
3
import discord
4
+ from profanity_check import predict_prob
4
5
5
6
6
7
def __init__ (bot ):
@@ -88,6 +89,13 @@ async def on_message(message):
88
89
if char not in punctuations :
89
90
msg = msg + char
90
91
92
+ # profanity check
93
+ prob = predict_prob ([msg ])
94
+ if prob >= 0.8 :
95
+ em = discord .Embed (title = f"AI Analysis Results" , color = 0xC54B4F )
96
+ em .add_field (name = 'PROFANITY DETECTED! ' , value = str (prob [0 ]))
97
+ await message .channel .send (embed = em )
98
+
91
99
if msg .startswith ("system call " ):
92
100
content = msg [12 :].split (" " )
93
101
if content [0 ].lower () == "inspect" :
You can’t perform that action at this time.
0 commit comments