]> git.localhorst.tv Git - alttp.git/commitdiff
sync user command
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 9 Dec 2025 11:59:43 +0000 (12:59 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 9 Dec 2025 11:59:43 +0000 (12:59 +0100)
app/Console/Commands/DiscordSyncUserCommand.php [new file with mode: 0644]

diff --git a/app/Console/Commands/DiscordSyncUserCommand.php b/app/Console/Commands/DiscordSyncUserCommand.php
new file mode 100644 (file)
index 0000000..f66ec51
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+namespace App\Console\Commands;
+
+use App\Models\DiscordBotCommand;
+use Illuminate\Console\Command;
+
+class DiscordSyncUserCommand extends Command
+{
+       /**
+        * The name and signature of the console command.
+        *
+        * @var string
+        */
+       protected $signature = 'discord:sync-user {user_id}';
+
+       /**
+        * The console command description.
+        *
+        * @var string
+        */
+       protected $description = 'Sync discord user with given ID';
+
+       /**
+        * Execute the console command.
+        *
+        * @return int
+        */
+       public function handle()
+       {
+               $user_id = $this->argument('user_id');
+
+               DiscordBotCommand::syncUser($user_id);
+
+               return 0;
+       }
+}