fixed parent permission problem;
This commit is contained in:
parent
d599eb9825
commit
b2850d668a
|
|
@ -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,
|
||||
PermissionOverwrites: parent.PermissionOverwrites,
|
||||
}
|
||||
|
||||
dchan, err = s.ChannelEdit(dchan.ID, &edit)
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue