Open
Description
🎉 Feature Request
Provide further variables to all commands by using setCommandConfig() with an empty command name
Summary
in Telegram.php one could change function getCommandConfig() f.e. as follows :
public function getCommandConfig($command)
{
$config=isset($this->commands_config[$command]) ? $this->commands_config[$command] : [];
if (isset($this->commands_config[''])) $config=array_merge($this->commands_config[''],$config);
return $config;
}
then, using
$telegram->setCommandConfig('', [
'key' => 'value',
]);
it is possible to add extra variables to all commands on top of variables for a particular command.
Existing 'general' keys are replaced by (if present) keys for a particular command.