]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/DiscordBotCommand.php
queue user sync on discovery
[alttp.git] / app / Models / DiscordBotCommand.php
index ca8a0308ce0d96d37cd3d902b827cef327bb0925..7d7c3a88da96b6761a74e943474dd5ef1e6aaa78 100644 (file)
@@ -25,6 +25,16 @@ class DiscordBotCommand extends Model
                $cmd->save();
        }
 
+       public static function syncUser($user_id) {
+               $cmd = new DiscordBotCommand();
+               $cmd->command = 'sync-user';
+               $cmd->parameters = [
+                       'user' => $user_id,
+               ];
+               $cmd->status = 'pending';
+               $cmd->save();
+       }
+
        public function tournament() {
                return $this->belongsTo(Tournament::class);
        }