diff --git a/bot.py b/bot.py index 75f5bf5..77b62c4 100644 --- a/bot.py +++ b/bot.py @@ -40,7 +40,8 @@ GIVEAWAY_WEBSITE_URL = os.getenv("GIVEAWAY_WEBSITE_URL") features = { "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 = {} @@ -1478,6 +1479,10 @@ async def addbackgrounddata(ctx, *, data: str): @client.hybrid_command() async def summarize(ctx, number: int): """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 user_perms = load_user_data_sync(ctx.author.id, guild_id) if 5 < user_perms["permission"]: