Trying to register a subCommand using registerSubCommand(), I got the following error:
PHP Fatal error: Uncaught Error: Call to undefined method Discord\CommandClient\Command::addSubCommandAlias() in /home/<username>/<botname>/vendor/team-reflex/discord-php/src/Discord/CommandClient/Command.php:99
I got it fixed easily by changing
foreach ($options['aliases'] as $alias) { $this->addSubCommandAlias($alias, $command); }
to
foreach ($options['aliases'] as $alias) { $this->registerSubCommandAlias($alias, $command); }
I am though unsure whether this is a bug in the code or I just used the method in the wrong way. Anyone else had this problem before?
Trying to register a subCommand using registerSubCommand(), I got the following error:
PHP Fatal error: Uncaught Error: Call to undefined method Discord\CommandClient\Command::addSubCommandAlias() in /home/<username>/<botname>/vendor/team-reflex/discord-php/src/Discord/CommandClient/Command.php:99
I got it fixed easily by changing
foreach ($options['aliases'] as $alias) { $this->addSubCommandAlias($alias, $command); }
toforeach ($options['aliases'] as $alias) { $this->registerSubCommandAlias($alias, $command); }
I am though unsure whether this is a bug in the code or I just used the method in the wrong way. Anyone else had this problem before?