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:
parent
ea67d826e2
commit
2f7e4d7da0
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user