overload owner refreshuser with a user-id as parameter
This commit is contained in:
parent
e4fd828a13
commit
8f861ee0bc
1 changed files with 16 additions and 0 deletions
|
@ -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")]
|
||||
|
|
Loading…
Reference in a new issue