X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FDiscordBotCommand.php;h=7d7c3a88da96b6761a74e943474dd5ef1e6aaa78;hb=HEAD;hp=ca8a0308ce0d96d37cd3d902b827cef327bb0925;hpb=de6fd9ef047bda248eebec0c135f7487e781a7ae;p=alttp.git diff --git a/app/Models/DiscordBotCommand.php b/app/Models/DiscordBotCommand.php index ca8a030..7d7c3a8 100644 --- a/app/Models/DiscordBotCommand.php +++ b/app/Models/DiscordBotCommand.php @@ -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); }