overload owner refreshuser with a user-id as parameter

This commit is contained in:
runebaas 2019-05-16 22:17:33 +02:00
parent e4fd828a13
commit 8f861ee0bc
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -92,6 +92,22 @@ namespace Geekbot.net.Commands.Admin.Owner
await _errorHandler.HandleCommandException(e, Context); 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)] [Command("error", RunMode = RunMode.Async)]
[Summary("Throw an error un purpose")] [Summary("Throw an error un purpose")]