From 8f861ee0bcbb52251a7394b65f320764752d1c44 Mon Sep 17 00:00:00 2001 From: runebaas Date: Thu, 16 May 2019 22:17:33 +0200 Subject: [PATCH] overload owner refreshuser with a user-id as parameter --- Geekbot.net/Commands/Admin/Owner/Owner.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Geekbot.net/Commands/Admin/Owner/Owner.cs b/Geekbot.net/Commands/Admin/Owner/Owner.cs index 74e0e8e..996d848 100644 --- a/Geekbot.net/Commands/Admin/Owner/Owner.cs +++ b/Geekbot.net/Commands/Admin/Owner/Owner.cs @@ -92,6 +92,22 @@ namespace Geekbot.net.Commands.Admin.Owner await _errorHandler.HandleCommandException(e, Context); } } + + [Command("refreshuser", RunMode = RunMode.Async)] + [Summary("Refresh a user in the user cache")] + public async Task PopUserRepoCommand([Summary("user-id")] ulong userId) + { + try + { + var user = _client.GetUser(userId); + await _userRepository.Update(user); + await ReplyAsync($"Refreshed: {user.Username}#{user.Discriminator}"); + } + catch (Exception e) + { + await _errorHandler.HandleCommandException(e, Context); + } + } [Command("error", RunMode = RunMode.Async)] [Summary("Throw an error un purpose")]