mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-12-13 22:08:37 +00:00
another broken query that I can't properly fix myself
This commit is contained in:
parent
a33c69a2bd
commit
4a9fcb2156
@ -45,6 +45,8 @@ namespace CompatBot.Commands
|
||||
[Command("users"), Aliases("top"), RequiresBotModRole, TriggersTyping]
|
||||
[Description("List users with warnings, sorted from most warned to least")]
|
||||
public async Task Users(CommandContext ctx, [Description("Optional number of items to show. Default is 10")] int number = 10)
|
||||
{
|
||||
try
|
||||
{
|
||||
var isMod = ctx.User.IsWhitelisted(ctx.Client, ctx.Guild);
|
||||
if (number < 1)
|
||||
@ -71,6 +73,12 @@ namespace CompatBot.Commands
|
||||
}
|
||||
await ctx.SendAutosplitMessageAsync(new StringBuilder("Warning count per user:").Append(table)).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Config.Log.Error(e);
|
||||
await ctx.ReactWithAsync(Config.Reactions.Failure, "SQL query for this command is broken at the moment", true).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[Command("by"), RequiresBotModRole]
|
||||
[Description("Shows warnings issued by the specified moderator")]
|
||||
|
Loading…
Reference in New Issue
Block a user