|
@@ 201-203 (lines=3) @@
|
| 198 |
|
{ |
| 199 |
|
if (array_key_exists($name, $this->commands)) { |
| 200 |
|
return $this->commands[$name]->make($this->telegram, $arguments, $message); |
| 201 |
|
} elseif (array_key_exists($name, $this->commandAliases)) { |
| 202 |
|
return $this->commandAliases[$name]->make($this->telegram, $arguments, $message); |
| 203 |
|
} elseif ($command = collect($this->commands)->filter(function($command) use ($name){ |
| 204 |
|
return $command instanceof $name; |
| 205 |
|
})->first()) { |
| 206 |
|
$command->make($this->telegram, $arguments, $message); |
|
@@ 207-209 (lines=3) @@
|
| 204 |
|
return $command instanceof $name; |
| 205 |
|
})->first()) { |
| 206 |
|
$command->make($this->telegram, $arguments, $message); |
| 207 |
|
} elseif (array_key_exists('help', $this->commands)) { |
| 208 |
|
return $this->commands['help']->make($this->telegram, $arguments, $message); |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
return 'Ok'; |
| 212 |
|
} |