Closed adammcd9 closed 2 years ago
Thanks for the PR. This seems to be a breaking change, I would suggest simply overriding the id in your command class if you need a unique id, for example:
class Logout extends SpotlightCommand
{
protected string $name = 'Logout';
protected string $description = 'Logout out of your account';
public function getId(): string
{
return md5($this->name);
}
}
This PR derives the ID of a command from the command name instead of the class name. #43 presented the idea of adding the same command multiple times with different parameters, however, this does not work due to the ID being the same in every instance. They register fine, but only one is ever callable.
Happy to change this if there are any more thoughts on how to create a unique ID! I presume command names would normally be unique, though.