#Get forum 's original post help

1 messages · Page 1 of 1 (latest)

daring crow
#

Hi,
I was trying to get forum's original post (the first message) and i did the below code

var forum = Context.Guild.GetForumChannel(xxxxxxxxxxxx);
var posts = await forum.GetActiveThreadsAsync();
var post = posts.First(**Mock search criteria**);
        
        
var messages = await post.GetMessagesAsync(10).FlattenAsync();
var message = messages.First();

So my questions are:

  1. Do get GetMessagesAsync(10) brings the last 10 messages? Can i get the first 10 messages?
  2. Is there a better solution to read from GetMessagesAsync than to FlattenAsync?
  3. Is there any other solution to get OP?
polar bramble
#

iirc the id of the thread is also the id of the first message

#

so you could just GetMessagesAsync in the thread with one's id

daring crow
#

Ohh that seems helpful. I will try this!

daring crow
#

Yes, indeed that works!