#Close a post from forum

1 messages · Page 1 of 1 (latest)

heavy hawk
#

I would like understand if is possible close a post from a forum, like this forum.
For example, i write on chat "!close" and my bot close all post of my forum, is possible??

wheat scaffold
#

maybe with getting the the post as a threadChannel and then set the metadata with ModifyAsync to archived

heavy hawk
#

where i can found documentation to read and understand how i can start?

wheat scaffold
#

this is the api documentation. A ForumPost is a threadchannel behind the scences

heavy hawk
#

ok ... i will search.

#

Th

heavy hawk
#

@wheat scaffold i readed the documentation and i dont understanded very well the api.

wheat scaffold
#
var chnl = (DiscordThreadChannel) await DiscordClient.GetChannel({IdOfPost});
await chnl.ModifyAsync(x => x.IsArchived = true);
#

this could work