Add includeCommand parameter to getAnyText method

This commit is contained in:
netkas 2024-11-05 13:07:25 -05:00
parent 6c6d7abb56
commit b826d0d4dd

View file

@ -1026,11 +1026,12 @@
/** /**
* Retrieves any available text, prioritizing 'text' over 'caption'. * Retrieves any available text, prioritizing 'text' over 'caption'.
* *
* @param bool $includeCommand
* @return string|null * @return string|null
*/ */
public function getAnyText(): ?string public function getAnyText(bool $includeCommand=false): ?string
{ {
return $this->text ?? $this->caption; return $this->getText($includeCommand) ?? $this->getCaption($includeCommand);
} }
/** /**