Closed yoraze closed 1 year ago
you need to obtain the $command->id you received upon save() in order to delete($command->id), if you don't have it, use $this->bot->application->commands->freshen()->then(function ($commands) { }); and loop through them to find it.
$discord->application->commands->freshen()->then(function ($commands) use ($discord) {
foreach ($commands as $command) {
if ($command->name == 'name'){
$discord->application->commands->delete($command);
break;
}
}
});
This worked, thanks! ❤️
I just created
test
command with example from #691, but I dont know how to remove it now. I tried this (actually I just replacedsave
withdelete
that I found in AbstractRepository class):And this isnt working so idk is there a way to remove this command?