namespace App\Console\Commands;
+use App\Models\DiscordBotCommand as CommandModel;
use App\Models\DiscordChannel;
use App\Models\DiscordGuild;
use App\Models\DiscordRole;
$activity->name = 'HolySmoke';
$activity->url = 'https://alttp.localhorst.tv/';
$discord->updatePresence($activity);
+
+ $discord->getLoop()->addPeriodicTimer(1, function () use ($discord) {
+ $command = CommandModel::where('status', '=', 'pending')->oldest()->first();
+ if ($command) {
+ try {
+ $command->execute($discord);
+ } catch (\Exception $e) {
+ }
+ }
+ });
});
$discord->on(Event::GUILD_CREATE, function (Guild $guild, Discord $discord) {
try {