Calling $message->reply( 'xyz' ); in reply to a message in a thread fails with 'You can only send messages to text channels.', even though the thread is a text channel.
Removing these lines from src/Discord/Parts/Channel/Channel.php resolves the issue, but seems problematic to remove. The messages send successfully without the check.
if (! $this->isTextBased()) {
return reject(new \RuntimeException('You can only send messages to text channels.'));
}
Environment
PHP Version:
8.2.0
DiscordPHP Version:
dev-master @ 9c905aa
To Reproduce
Send two replies to a message in a thread.
Expected behavior
The replies should go through without an error.
Calling
$message->reply( 'xyz' );
in reply to a message in a thread fails with'You can only send messages to text channels.'
, even though the thread is a text channel.Removing these lines from
src/Discord/Parts/Channel/Channel.php
resolves the issue, but seems problematic to remove. The messages send successfully without the check.Environment
To Reproduce Send two replies to a message in a thread.
Expected behavior The replies should go through without an error.