From 4522ef2010ecd5b98779c04c017a0311e1665067 Mon Sep 17 00:00:00 2001 From: biast12 <53872542+biast12@users.noreply.github.com> Date: Mon, 21 Sep 2026 23:52:53 +0200 Subject: [PATCH 1/2] Update channel permission requirements Add ManageRoles to notification channel permissions for overwrite management, and reduce transcript channel requirements to the permissions it actually needs. --- botpermissions/requirements.go | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/botpermissions/requirements.go b/botpermissions/requirements.go index f4c335f..06d8673 100644 --- a/botpermissions/requirements.go +++ b/botpermissions/requirements.go @@ -47,15 +47,20 @@ var ChannelModeRequired = func() []permission.Permission { return perms }() -// NotifChannelRequired are the permissions the bot needs on the notification channel (thread mode only). -// It is MinimalPermissions with EmbedLinks and AttachFiles appended. -var NotifChannelRequired = func() []permission.Permission { - perms := make([]permission.Permission, 0, len(MinimalPermissions)+2) - perms = append(perms, MinimalPermissions...) - perms = append(perms, permission.EmbedLinks, permission.AttachFiles) - return perms -}() +// NotifChannelRequired are the permissions the bot needs on the notification channel. +// ManageRoles is needed because the add/remove support/admin commands write an overwrite here. +var NotifChannelRequired = []permission.Permission{ + permission.ViewChannel, + permission.SendMessages, + permission.EmbedLinks, + permission.ReadMessageHistory, + permission.UseApplicationCommands, + permission.ManageRoles, +} // TranscriptChannelRequired are the permissions the bot needs on the transcript channel (any mode). -// Equivalent to MinimalPermissions. -var TranscriptChannelRequired = MinimalPermissions +var TranscriptChannelRequired = []permission.Permission{ + permission.ViewChannel, + permission.SendMessages, + permission.EmbedLinks, +} From c65e86757adbdf4486db9f16a534edbf01cf5f5a Mon Sep 17 00:00:00 2001 From: biast12 <53872542+biast12@users.noreply.github.com> Date: Tue, 22 Sep 2026 16:49:10 +0200 Subject: [PATCH 2/2] Add guild permission requirements Define consolidated guild-level permissions, including thread permissions needed by /notes, and add the minimal permissions required for pending-category status updates. --- botpermissions/requirements.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/botpermissions/requirements.go b/botpermissions/requirements.go index 06d8673..e890fc6 100644 --- a/botpermissions/requirements.go +++ b/botpermissions/requirements.go @@ -58,6 +58,25 @@ var NotifChannelRequired = []permission.Permission{ permission.ManageRoles, } +// GuildRequired are guild-level permissions, including the thread permissions /notes needs. +var GuildRequired = func() []permission.Permission { + perms := []permission.Permission{ + permission.ManageWebhooks, + permission.PinMessages, + permission.ManageRoles, + permission.ManageChannels, + permission.CreatePrivateThreads, + permission.SendMessagesInThreads, + } + return append(perms, StandardPermissions...) +}() + +// PendingCategoryRequired covers the status update, which only reparents an existing channel. +var PendingCategoryRequired = []permission.Permission{ + permission.ViewChannel, + permission.ManageChannels, +} + // TranscriptChannelRequired are the permissions the bot needs on the transcript channel (any mode). var TranscriptChannelRequired = []permission.Permission{ permission.ViewChannel,