]> git.localhorst.tv Git - alttp.git/blobdiff - app/DiscordAppCommands/AosrPresetCommand.php
remove aosr command
[alttp.git] / app / DiscordAppCommands / AosrPresetCommand.php
index 7a8907a419c87b3258ded2761bed28144de30380..e4d0fbb529ddf08c0eab8756f2fef82fa0d791f2 100644 (file)
@@ -54,6 +54,17 @@ class AosrPresetCommand {
                $discord->application->commands->save($cmd);
        }
 
+       public static function delete(Discord $discord) {
+               $discord->application->commands->freshen()->then(function () use ($discord) {
+                       $cmd = $discord->application->commands->find(function ($cmd) {
+                               return $cmd->name == 'aosr';
+                       });
+                       if ($cmd) {
+                               $discord->application->commands->delete($cmd);
+                       }
+               });
+       }
+
        public static function presetByName($name) {
                if (isset(static::$presets[$name])) {
                        return static::$presets[$name];