all repos — stealth-developers @ 2946427512ce9ca2c95f135bdc6dfc055bcdb0bc

feat: dev perm override
vi v@vt3e.cat
Sun, 01 Mar 2026 05:07:24 +0000
commit

2946427512ce9ca2c95f135bdc6dfc055bcdb0bc

parent

0e09758ab76a99106a2ea0f3f11fc9c88ac6e563

1 files changed, 9 insertions(+), 5 deletions(-)

jump to
M src/interactions/commands/config.tssrc/interactions/commands/config.ts

@@ -152,7 +152,12 @@ const action = interaction.options.getString("action", true);

const role = interaction.options.getRole("role") as Role | null; const guildId = interaction.guild.id; - if (!(await hasManagerPermissions(interaction.member as GuildMember))) { + const isDeveloper = interaction.user.id === cfg.developerId; + const hasPerms = await hasManagerPermissions( + interaction.member as GuildMember, + ); + + if (!isDeveloper && !hasPerms) { await interaction.reply({ content: "❌ You do not have manager permissions to run this action.", flags: ["Ephemeral"],

@@ -215,7 +220,7 @@ })

.execute(); await interaction.reply({ - content: `✅ added ${role} as a manager role.`, + content: `✅ Added ${role} as a manager role.`, flags: ["Ephemeral"], }); return;

@@ -228,7 +233,7 @@ .where(eq(managerTable.roleId, role.id))

.execute(); await interaction.reply({ - content: `✅ removed ${role} from manager roles.`, + content: `✅ Removed ${role} from manager roles.`, flags: ["Ephemeral"], }); return;

@@ -262,7 +267,6 @@ }

const guildId = interaction.guild.id; - // use getGuild to ensure a row exists await getGuild(guildId); if (isChannelKey(key)) {

@@ -336,7 +340,7 @@ .execute();

if (!result || result.length === 0) { await interaction.reply({ - content: "📋 no configuration found for this server.", + content: "📋 No configuration found for this server.", flags: ["Ephemeral"], }); return;