]> git.localhorst.tv Git - alttp.git/blobdiff - app/DiscordAppCommands/AosrPresetCommand.php
remove aosr command
[alttp.git] / app / DiscordAppCommands / AosrPresetCommand.php
index 9a537db8006452ed349a99cc7a1fec099746d856..e4d0fbb529ddf08c0eab8756f2fef82fa0d791f2 100644 (file)
@@ -54,6 +54,29 @@ 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];
+               }
+               foreach (static::$presets as $presetName => $preset) {
+                       if (strcasecmp($name, $presetName) === 0) {
+                               return $preset;
+                       }
+               }
+               return null;
+       }
+
        public static function listen(Discord $discord) {
                $discord->listenCommand(['aosr', 'preset'], function(Interaction $interaction) use ($discord) {
                        $interaction
@@ -110,6 +133,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -134,6 +159,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'true',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -158,6 +185,8 @@ class AosrPresetCommand {
                                'telestart' => 'true',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -182,6 +211,8 @@ class AosrPresetCommand {
                                'telestart' => 'true',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -206,6 +237,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -230,6 +263,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'true',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -254,6 +289,8 @@ class AosrPresetCommand {
                                'telestart' => 'true',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -278,6 +315,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -302,6 +341,8 @@ class AosrPresetCommand {
                                'telestart' => 'true',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -326,6 +367,34 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'true',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
+                               'palette' => 'Vanilla',
+                       ],
+               ],
+               'AreaRequireAllSouls' => [
+                       'name' => 'Area require all souls',
+                       'value' => 'AreaRequireAllSouls',
+                       'settings' => [
+                               'logic' => 'AreaTechTiers',
+                               'nodupes' => 'true',
+                               'panther' => 'NeverExists',
+                               'area' => 'AreaRandom',
+                               'boss' => 'Dead-endShuffle',
+                               'enemy' => 'RandomNoLimit',
+                               'itempool' => 'Standard',
+                               'weight' => '2.5',
+                               'grahm' => 'BookSouls',
+                               'kicker' => 'true',
+                               'startshop' => 'Vanilla',
+                               'shopprice' => 'Vanilla',
+                               'shopSouls' => 'Half',
+                               'levelexp' => 'Lvl1',
+                               'telestart' => 'false',
+                               'mapassist' => 'false',
+                               'doublechaos' => 'true',
+                               'reqallsouls' => 'true',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -350,6 +419,8 @@ class AosrPresetCommand {
                                'telestart' => 'true',
                                'mapassist' => 'true',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -374,6 +445,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -398,16 +471,18 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
-               'SGLive2021' => [
-                       'name' => 'SGLive 2021',
-                       'value' => 'SGLive2021',
+               'Tournament2021' => [
+                       'name' => 'Tournament 2021',
+                       'value' => 'Tournament2021',
                        'settings' => [
                                'logic' => 'AreaTechTiers',
                                'nodupes' => 'false',
-                               'panther' => 'FirstAlways',
+                               'panther' => 'Rand70Dup',
                                'area' => 'AreaRandom',
                                'boss' => 'Dead-endShuffle',
                                'enemy' => 'Vanilla',
@@ -422,16 +497,18 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
-               'Tournament2021' => [
-                       'name' => 'Tournament 2021',
-                       'value' => 'Tournament2021',
+               'SGLive2021' => [
+                       'name' => 'SGLive 2021',
+                       'value' => 'SGLive2021',
                        'settings' => [
                                'logic' => 'AreaTechTiers',
                                'nodupes' => 'false',
-                               'panther' => 'Rand70Dup',
+                               'panther' => 'FirstAlways',
                                'area' => 'AreaRandom',
                                'boss' => 'Dead-endShuffle',
                                'enemy' => 'Vanilla',
@@ -446,6 +523,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],
@@ -470,6 +549,8 @@ class AosrPresetCommand {
                                'telestart' => 'false',
                                'mapassist' => 'false',
                                'doublechaos' => 'false',
+                               'reqallsouls' => 'false',
+                               'noww' => 'false',
                                'palette' => 'Vanilla',
                        ],
                ],