discord-php / DiscordPHP

An API to interact with the popular messaging app Discord
MIT License
985 stars 236 forks source link

$message->reply to message in thread intermittently fails with #1073

Closed pd-cm closed 1 year ago

pd-cm commented 1 year ago

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

To Reproduce Send two replies to a message in a thread.

Expected behavior The replies should go through without an error.

CommandString commented 1 year ago

We're unable to replicate this issue on our side. Could you be more specific about how we can reproduce?

key2peace commented 1 year ago

update and try again