Closed Jannik44 closed 1 year ago
getChannel()
can be only used to get Channel, not Threads. This is not a bug.
If you wish to get the thread or channel where the message was sent, just use $message->channel
And you must always check if $channel
is not null
, because it might be not cached yet.
$message->author != "<@1095101543872725092>"
even this line is wrong, to compare author id it must be:
$message->author->id != 1095101543872725092
Environment
Describe the bug I tried to send messages to normal channels, works as expected, when i send messages into a forum thread i get no message and the program crashes
To Reproduce Steps to reproduce the behavior:
Expected behavior it should send a message in the forum thread
Screenshots
![grafik](https://user-images.githubusercontent.com/76906033/231201804-b3092457-b304-4cd4-ac6b-134ec5c45d7c.png)