-
I made a bot to work with threads in a forum channel. It was working correctly previously, but has now stopped working. I tracked the problem down to the Log: Code: tl, err := s.GuildThreadsActive(UGC) //ThreadsActive(ChannelProposals) does not work?
if err != nil {
log.Warnw("Couldn't get active threads", "err", err)
continue
}
log.Debugw("Got active threads", "n", len(tl.Threads))
for _, ch := range tl.Threads {
if ch.ParentID != ChannelProposals {
continue
}
phase, multi := analyzeTags(ch.AppliedTags)
log.Debugw("Active thread", "name", ch.Name, "tags", ch.AppliedTags, "phase", phaseString[phase])
// ch.AppliedTags worked before, but now it doesn't ^^ Version: v0.27.1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found out Therefore as a workaround, I am now using: threads, _ := session.GuildThreadsActive(...)
for _, channel := range threads {
channel, _ = session.Channel(channel.ID)
// ... now channel.AppliedTags is populated at the expense of an extra call per channel
} |
Beta Was this translation helpful? Give feedback.
Found out
session.GuildThreadsActive
does not populatechannel.AppliedTags
; since this bot was working previously, I guess this is a breaking change. However,session.Channel
does still populateAppliedTags
.Therefore as a workaround, I am now using: