From 1536934306b01bd769e876ee9614eb02e79f0462 Mon Sep 17 00:00:00 2001 From: groot Date: Sat, 9 Aug 2025 22:40:18 +0000 Subject: [PATCH] main.go aktualisiert --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 4579bd4..b001e41 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,7 @@ func createPrivateVCAndMove( discordgo.PermissionVoiceConnect, ) + botID := s.State.User.ID name := "🔒 " + displayName newChan, err := s.GuildChannelCreateComplex(guildID, discordgo.GuildChannelCreateData{ Name: name, @@ -53,6 +54,13 @@ func createPrivateVCAndMove( PermissionOverwrites: []*discordgo.PermissionOverwrite{ {ID: everyoneID, Type: discordgo.PermissionOverwriteTypeRole, Deny: denyEveryone}, {ID: requesterID, Type: discordgo.PermissionOverwriteTypeMember, Allow: allowOwner}, + { // <<< NEU: Bot-Overwrite, damit Move klappt + ID: botID, + Type: discordgo.PermissionOverwriteTypeMember, + Allow: int64(discordgo.PermissionViewChannel | + discordgo.PermissionVoiceConnect | + discordgo.PermissionVoiceMoveMembers), + }, }, }) if err != nil {