1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 23:51:12 +01:00

make commandType better

This commit is contained in:
َAhJ 2023-11-02 21:29:45 +03:30
parent ea67d826e2
commit 2f7e4d7da0

View File

@ -164,11 +164,7 @@ abstract class Message extends AbstractMessage
substr($this->message, $space+1)
);
$this->commandArgs = $args === [''] ? [] : $args;
$this->commandType = match ($this->message[0]) {
'.' => CommandType::DOT,
'/' => CommandType::SLASH,
'!' => CommandType::BANG,
};
$this->commandType = CommandType::from($this->message[0]);
} else {
$this->command = null;
$this->commandArgs = null;