+
+ $discord->getLoop()->addPeriodicTimer(1, function () use ($discord) {
+ $command = CommandModel::where('status', '=', 'pending')->oldest()->first();
+ if ($command) {
+ try {
+ $command->execute($discord);
+ } catch (\Exception $e) {
+ }
+ }
+ });
+
+ if (config('discord.enable_commands')) {
+ AlttpCommand::listen($discord);
+ }
+ if (config('discord.create_commands')) {
+ AlttpCommand::create($discord);
+ }