From b0bf23ae2af1b4427be9d10ed363d1630a7264b1 Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Fri, 26 Sep 2025 13:26:02 +0800 Subject: [PATCH] Simplify bot prefix retrieval logic Removed special handling for bot owner and access users in get_prefix. The function now always returns the configured prefix or the default. --- main.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/main.py b/main.py index d8111cf..ed9a483 100644 --- a/main.py +++ b/main.py @@ -207,13 +207,7 @@ class CommandCheck(discord.app_commands.CommandTree): async def get_prefix(bot: commands.Bot, message: discord.Message) -> str: settings = await func.get_settings(message.guild.id) - prefix = settings.get("prefix", func.settings.bot_prefix) - - # Allow owner to use the bot without a prefix - if prefix and not message.content.startswith(prefix) and (await bot.is_owner(message.author) or message.author.id in func.settings.bot_access_user): - return "" - - return prefix + return settings.get("prefix", func.settings.bot_prefix) # Loading settings and logger func.settings = Settings(func.open_json("settings.json"))