From b166a262c61314a8ef8fcb96e7e88e52e2d195a5 Mon Sep 17 00:00:00 2001 From: Lilac-Rose Date: Fri, 2 Jan 2026 19:55:54 +0100 Subject: [PATCH] i think i fixed it lowkey --- commands/generate_role_color_images.py | 4 ++-- commands/salt.py | 5 +---- events/git_webhook.py | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/commands/generate_role_color_images.py b/commands/generate_role_color_images.py index 8bc4cfb..c065a8a 100644 --- a/commands/generate_role_color_images.py +++ b/commands/generate_role_color_images.py @@ -7,7 +7,7 @@ from PIL import Image, ImageDraw, ImageFont import os import io from math import floor, ceil -from moderation.loader import ModerationBase, ADMIN_ROLE_ID +from moderation.loader import ModerationBase import importlib import sys @@ -31,7 +31,7 @@ class ColorImageGen(commands.Cog): self.FONTS_PATH = role_color_module.FONTS_PATH @commands.command(name="generateimages") - @commands.has_role(ADMIN_ROLE_ID) + @ModerationBase.is_admin() async def generate_list(self, ctx): # Reload config to get latest values self._reload_config() diff --git a/commands/salt.py b/commands/salt.py index 8682128..52a225d 100644 --- a/commands/salt.py +++ b/commands/salt.py @@ -13,12 +13,9 @@ class SaltCommand(ModerationBase): self.salt_targets = {} @commands.command(name="salt") + @ModerationBase.is_admin() async def salt(self, ctx, member: discord.Member, *, reason: str = None): """React with salt emoji to the user's next message""" - # Check if the author is a mod/admin - if not any(role.id == ADMIN_ROLE_ID for role in ctx.author.roles): - await ctx.send("You have no power here.") - return if member.id == 252130669919076352: chance = random.randrange(1,101) diff --git a/events/git_webhook.py b/events/git_webhook.py index a8ffdab..ce8068a 100644 --- a/events/git_webhook.py +++ b/events/git_webhook.py @@ -9,8 +9,8 @@ from dotenv import load_dotenv load_dotenv() # Multiple channels to send commit notifications to -COMMIT_CHANNEL_IDS = [876777562599194644, 1437941632849940563] -USER_ID_TO_PING = 252130669919076352 +COMMIT_CHANNEL_IDS = [876777562599194644, 1437941632849940563, 1424145004976275617] +USER_ID_TO_PING = 771709136051372032 WEBHOOK_SECRET = os.getenv("GITHUB_WEBHOOK_SECRET", "") WEBHOOK_PORT = int(os.getenv("WEBHOOK_PORT", 5000))