Fix the fucking bot #3524
This commit is contained in:
@@ -32,10 +32,9 @@ AI_PROHIBITED_PATTERNS = [
|
|||||||
r"\bблять\b", r"\bсука\b", r"\bнахуй\b", r"\bхуй\b",
|
r"\bблять\b", r"\bсука\b", r"\bнахуй\b", r"\bхуй\b",
|
||||||
]
|
]
|
||||||
CHANNEL_THEMES = {
|
CHANNEL_THEMES = {
|
||||||
1424038714266357886: "Gaming, General Chat, and Fun",
|
1424038714266357886: "Gaming, General Chat, Anime and Fun",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def is_ai_prompt_disallowed(text: str) -> bool:
|
def is_ai_prompt_disallowed(text: str) -> bool:
|
||||||
lowered = text.lower()
|
lowered = text.lower()
|
||||||
for pat in AI_PROHIBITED_PATTERNS:
|
for pat in AI_PROHIBITED_PATTERNS:
|
||||||
|
|||||||
+6
-6
@@ -1045,7 +1045,7 @@ async def check_chat_revive():
|
|||||||
@app_commands.describe(message_id="ID of message to attach", emoji="Emoji", role="Role to give")
|
@app_commands.describe(message_id="ID of message to attach", emoji="Emoji", role="Role to give")
|
||||||
async def slash_reactionrole(interaction: discord.Interaction, message_id: str, emoji: str, role: discord.Role):
|
async def slash_reactionrole(interaction: discord.Interaction, message_id: str, emoji: str, role: discord.Role):
|
||||||
if not interaction.user.guild_permissions.manage_roles:
|
if not interaction.user.guild_permissions.manage_roles:
|
||||||
await interaction.response.send_message(tars_text("Access denied — insufficient clearance.", "error"),
|
await interaction.response.send_message(tars_text("Access denied: insufficient clearance.", "error"),
|
||||||
ephemeral=True)
|
ephemeral=True)
|
||||||
return
|
return
|
||||||
async with aiosqlite.connect(DB_FILE) as db:
|
async with aiosqlite.connect(DB_FILE) as db:
|
||||||
@@ -1129,7 +1129,7 @@ async def slash_setmotd(interaction: discord.Interaction, channel: discord.TextC
|
|||||||
async def slash_clean(interaction: discord.Interaction, amount: int):
|
async def slash_clean(interaction: discord.Interaction, amount: int):
|
||||||
if not interaction.user.guild_permissions.manage_messages:
|
if not interaction.user.guild_permissions.manage_messages:
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
tars_text("Access denied — insufficient clearance.", "error"), ephemeral=True
|
tars_text("Access denied: insufficient clearance.", "error"), ephemeral=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
await interaction.response.defer(ephemeral=True)
|
await interaction.response.defer(ephemeral=True)
|
||||||
@@ -1272,7 +1272,7 @@ async def slash_boostshop(interaction: discord.Interaction):
|
|||||||
current_points = await get_boost_points(interaction.user.id)
|
current_points = await get_boost_points(interaction.user.id)
|
||||||
if current_points < cost:
|
if current_points < cost:
|
||||||
await interaction_select.response.send_message(
|
await interaction_select.response.send_message(
|
||||||
tars_text(f"Insufficient points — you need {cost}, but you only have {current_points}.", "error"),
|
tars_text(f"Insufficient points: you need {cost}, but you only have {current_points}.", "error"),
|
||||||
ephemeral=True
|
ephemeral=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@@ -1360,7 +1360,7 @@ async def slash_close(interaction: discord.Interaction):
|
|||||||
async def slash_boostpoints_add(interaction: discord.Interaction, member: discord.Member, amount: int):
|
async def slash_boostpoints_add(interaction: discord.Interaction, member: discord.Member, amount: int):
|
||||||
if not interaction.user.guild_permissions.manage_guild:
|
if not interaction.user.guild_permissions.manage_guild:
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
tars_text("Access denied — insufficient clearance.", "error"), ephemeral=True
|
tars_text("Access denied: insufficient clearance.", "error"), ephemeral=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
if amount <= 0:
|
if amount <= 0:
|
||||||
@@ -1387,7 +1387,7 @@ async def slash_boostpoints_add(interaction: discord.Interaction, member: discor
|
|||||||
async def slash_boostpoints_remove(interaction: discord.Interaction, member: discord.Member, amount: int):
|
async def slash_boostpoints_remove(interaction: discord.Interaction, member: discord.Member, amount: int):
|
||||||
if not interaction.user.guild_permissions.manage_guild:
|
if not interaction.user.guild_permissions.manage_guild:
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
tars_text("Access denied — insufficient clearance.", "error"), ephemeral=True
|
tars_text("Access denied: insufficient clearance.", "error"), ephemeral=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
if amount <= 0:
|
if amount <= 0:
|
||||||
@@ -1473,7 +1473,7 @@ async def slash_config_view(interaction: discord.Interaction):
|
|||||||
|
|
||||||
@tree.command(name="ai_stats", description="View AI usage metrics (moderator)")
|
@tree.command(name="ai_stats", description="View AI usage metrics (moderator)")
|
||||||
async def slash_ai_stats(interaction: discord.Interaction):
|
async def slash_ai_stats(interaction: discord.Interaction):
|
||||||
if not interaction.user.guild_permissions.manage_messages:
|
if not interaction.user.guild_permissions.ban_members:
|
||||||
await interaction.response.send_message(tars_text("Insufficient clearance."), ephemeral=True)
|
await interaction.response.send_message(tars_text("Insufficient clearance."), ephemeral=True)
|
||||||
return
|
return
|
||||||
top_users = sorted(
|
top_users = sorted(
|
||||||
|
|||||||
Reference in New Issue
Block a user