Improve command handling in PollingBot

This commit is contained in:
netkas 2024-11-04 13:49:50 -05:00
parent 439ccdb123
commit f03490cb6c
4 changed files with 73 additions and 73 deletions

View file

@ -34,7 +34,7 @@
*/
protected function getMessage(): Message
{
return $this->update->getMessage();
return $this->update->getAnyMessage();
}
/**
@ -44,12 +44,12 @@
*/
protected function getArguments(): string
{
if(strlen($this->getMessage()->getText()) <= strlen(static::getCommand()) + 1)
if(strlen($this->getMessage()->getCommand()) <= strlen(static::getCommand()) + 1)
{
return '';
}
return substr($this->getMessage()->getText(), strlen(static::getCommand()) + 1);
return substr($this->getMessage()->getCommand(), strlen(static::getCommand()) + 1);
}
/**