|
13 | 13 | use Monolog\Logger; |
14 | 14 | use React\Promise\PromiseInterface; |
15 | 15 |
|
16 | | -use Throwable; |
17 | | - |
18 | 16 | class MessageServiceManager |
19 | 17 | { |
20 | 18 | public Civ13 $civ13; |
@@ -193,7 +191,6 @@ function (Message $message, string $command, array $message_filtered): PromiseIn |
193 | 191 | * This method generates server functions based on the server settings. |
194 | 192 | * It loops through the server settings and generates server functions for each enabled server. |
195 | 193 | * For each server, it generates the following message-related functions, prefixed with the server name: |
196 | | - * - configexists: checks if the server configuration exists. |
197 | 194 | * - host: starts the server host process. |
198 | 195 | * - kill: kills the server process. |
199 | 196 | * - restart: restarts the server process by killing and starting it again. |
@@ -250,27 +247,7 @@ function (Message $message, string $command, array $message_filtered) use (&$gam |
250 | 247 | }, |
251 | 248 | ['Admin']);*/ |
252 | 249 | $this->messageHandler |
253 | | - /*->offsetSet("{$gameserver->key}fixembedtimer", |
254 | | - fn(Message $message, string $command, array $message_filtered): PromiseInterface => |
255 | | - $message->react("⏱️")->then(fn() => $gameserver->currentRoundEmbedTimer($message))->then( |
256 | | - static fn() => $message->react("👍"), |
257 | | - fn(\Throwable $error): PromiseInterface => $message->react("👎")->then(fn() => $this->civ13->reply($message, $error->getMessage())) |
258 | | - ), |
259 | | - ['Owner', 'Chief Technical Officer']) |
260 | | - ->offsetSet("{$gameserver->key}updatecurrentroundembedmessagebuilder", |
261 | | - fn(Message $message, string $command, array $message_filtered): PromiseInterface => |
262 | | - $message->react("⏱️")->then(fn() => $gameserver->updateCurrentRoundEmbedMessageBuilder())->then( |
263 | | - static fn() => $message->react("👍"), |
264 | | - fn(\Throwable $error): PromiseInterface => $message->react("👎")->then(fn() => $this->civ13->reply($message, $error->getMessage())) |
265 | | - ), |
266 | | - ['Owner', 'Chief Technical Officer']) |
267 | | - ->offsetSet("{$gameserver->key}configexists", |
268 | | - fn(Message $message, string $command, array $message_filtered): PromiseInterface => |
269 | | - isset($gameserver->key) |
270 | | - ? $message->react("👍") |
271 | | - : $message->react("👎"), |
272 | | - ['Ambassador']) |
273 | | - ->offsetSet("{$gameserver->key}sportsteam", |
| 250 | + /*->offsetSet("{$gameserver->key}sportsteam", |
274 | 251 | fn(Message $message, string $command, array $message_filtered): PromiseInterface => // I don't know what this is supposed to be used for anymore but the file exists, is empty, and can't be read from. |
275 | 252 | $gameserver->sportsteam()->then( |
276 | 253 | fn($content) => $message->reply(Civ13::createBuilder()->setContent('Sports Teams')->addfileFromContent("{$gameserver->key}_sports_teams.txt", $content)), |
|
0 commit comments