Need help to post a message to a thread #1084
Unanswered
BlutVampir
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You will have to get the channel by id first then get the thread by the id. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I really struggle with a lot of things
I want to post a message to a thread.
I have the thread_id which can get via: $channel->threads ...
I tried to set:
$channel = $discord->getChannel($thread_id); which is not working and delivers a NULL.
I tried to:
$message = MessageBuilder::new()->setContent("Debug: test")->setReplyTo($thread_id);
which is also not woking. How can I get a Message posted to the thread?
Additionally I want afterwards to get all messages of the thread to:
$channel->getMessageHistory(['limit' => 50])->done(function (Collection $messages) {
print_r($messages);
});
this code is not woking, equalless if in a cannel or thread..
Can a Function
$thread = $discord->getChannel($thread_id)->getThread(thread_id); be implemented?
Or how can I manage these things?
Beta Was this translation helpful? Give feedback.
All reactions