Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
253e55e
1
Parent(s): 6ae3873
Update app.py (#12)
Browse files- Update app.py (f5f3541bf9effbd15a9fef7026eab99d5e4ff4fe)
Co-authored-by: Christopher Akiki <christopher@users.noreply.huggingface.co>
app.py
CHANGED
|
@@ -54,7 +54,6 @@ async def on_message(message):
|
|
| 54 |
if message.author != bot.user:
|
| 55 |
message_cache[message.id] = message
|
| 56 |
lunarflu = bot.get_user(811235357663297546) #811235357663297546
|
| 57 |
-
cakiki = bot.get_user(416019758492680203)
|
| 58 |
|
| 59 |
"""Backup"""
|
| 60 |
|
|
@@ -85,7 +84,6 @@ async def on_message(message):
|
|
| 85 |
if message.author != lunarflu:
|
| 86 |
return
|
| 87 |
dm_unwanted = await lunarflu.send(f" {lunarflu.mention} [experimental] SUSPICIOUS MESSAGE: {message_link} | {message.author}: {message.content}")
|
| 88 |
-
dm_unwanted = await cakiki.send(f" {cakiki.mention} [experimental] SUSPICIOUS MESSAGE: {message_link} | {message.author}: {message.content}")
|
| 89 |
except Exception as e:
|
| 90 |
print(f"Antispam->Detecting certain unwanted strings Error: {e}")
|
| 91 |
|
|
@@ -151,12 +149,7 @@ async def on_message(message):
|
|
| 151 |
f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n"
|
| 152 |
f"{alert}"
|
| 153 |
)
|
| 154 |
-
|
| 155 |
-
f"[EXPERIMENTAL ALERT] {message.author} may be posting too quickly! \n"
|
| 156 |
-
f"Spam count: {spam_count}\n"
|
| 157 |
-
f"Message content: {message.content}\n"
|
| 158 |
-
f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n"
|
| 159 |
-
)
|
| 160 |
# AUTO BAN ======================================================================================================
|
| 161 |
# Only in guild text contexts
|
| 162 |
if not message.guild:
|
|
|
|
| 54 |
if message.author != bot.user:
|
| 55 |
message_cache[message.id] = message
|
| 56 |
lunarflu = bot.get_user(811235357663297546) #811235357663297546
|
|
|
|
| 57 |
|
| 58 |
"""Backup"""
|
| 59 |
|
|
|
|
| 84 |
if message.author != lunarflu:
|
| 85 |
return
|
| 86 |
dm_unwanted = await lunarflu.send(f" {lunarflu.mention} [experimental] SUSPICIOUS MESSAGE: {message_link} | {message.author}: {message.content}")
|
|
|
|
| 87 |
except Exception as e:
|
| 88 |
print(f"Antispam->Detecting certain unwanted strings Error: {e}")
|
| 89 |
|
|
|
|
| 149 |
f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n"
|
| 150 |
f"{alert}"
|
| 151 |
)
|
| 152 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
# AUTO BAN ======================================================================================================
|
| 154 |
# Only in guild text contexts
|
| 155 |
if not message.guild:
|