modified: bot.py

This commit is contained in:
SimolZimol
2025-08-18 09:45:07 +02:00
parent 96a71652eb
commit ce3d4dc9ef

7
bot.py
View File

@@ -40,7 +40,8 @@ GIVEAWAY_WEBSITE_URL = os.getenv("GIVEAWAY_WEBSITE_URL")
features = { features = {
"askmultus": bool(int(os.getenv("ASKMULTUS_ENABLED", 0))), "askmultus": bool(int(os.getenv("ASKMULTUS_ENABLED", 0))),
"vision": bool(int(os.getenv("VISION_ENABLED", 0))) "vision": bool(int(os.getenv("VISION_ENABLED", 0))),
"summarize": bool(int(os.getenv("SUMMARIZE_ENABLED", 0)))
} }
giveaways = {} giveaways = {}
@@ -1478,6 +1479,10 @@ async def addbackgrounddata(ctx, *, data: str):
@client.hybrid_command() @client.hybrid_command()
async def summarize(ctx, number: int): async def summarize(ctx, number: int):
"""Summarizes the last x messages in the chat.""" """Summarizes the last x messages in the chat."""
if not features["summarize"]:
await ctx.send("Sorry, the summarize feature is currently disabled.")
return
guild_id = ctx.guild.id guild_id = ctx.guild.id
user_perms = load_user_data_sync(ctx.author.id, guild_id) user_perms = load_user_data_sync(ctx.author.id, guild_id)
if 5 < user_perms["permission"]: if 5 < user_perms["permission"]: