diff --git a/client/discord/discord_handler/discord_handler.go b/client/discord/discord_handler/discord_handler.go index b1bf3fb..6281095 100644 --- a/client/discord/discord_handler/discord_handler.go +++ b/client/discord/discord_handler/discord_handler.go @@ -607,10 +607,16 @@ func (h *Handler) CreateProject(s *discordgo.Session, i *discordgo.InteractionCr return } - // Edit created channel: + parent, err := s.Channel(h.conf.IsProjectChannel) + if err != nil { + log.Printf("get project as channel object failed: %v", err) + } + + // Edit created channel (new key needed, so use to make edit after creation) edit := discordgo.ChannelEdit{ - Name: p.Key + "-" + helpers.Cut(projectTitle), - ParentID: h.conf.IsProjectChannel, + Name: p.Key + "-" + helpers.Cut(projectTitle), + ParentID: h.conf.IsProjectChannel, + PermissionOverwrites: parent.PermissionOverwrites, } dchan, err = s.ChannelEdit(dchan.ID, &edit) diff --git a/cmd/__debug_bin1103051984 b/cmd/__debug_bin1103051984 deleted file mode 100755 index cd10c52..0000000 Binary files a/cmd/__debug_bin1103051984 and /dev/null differ