feat: better error reporting settings
This commit is contained in:
parent
f9aba1f129
commit
4a739c2d61
@ -53,9 +53,6 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
|||||||
// for now, only return error messages for explicit commands
|
// for now, only return error messages for explicit commands
|
||||||
public ulong? ErrorChannelFor(MessageCreateEvent evt, ulong userId)
|
public ulong? ErrorChannelFor(MessageCreateEvent evt, ulong userId)
|
||||||
{
|
{
|
||||||
if (!HasCommandPrefix(evt.Content, userId, out var cmdStart) || cmdStart == evt.Content.Length)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return evt.ChannelId;
|
return evt.ChannelId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ public class ErrorMessageService
|
|||||||
{
|
{
|
||||||
// globally rate limit errors for now, don't want to spam users when something breaks
|
// globally rate limit errors for now, don't want to spam users when something breaks
|
||||||
private static readonly Duration MinErrorInterval = Duration.FromSeconds(10);
|
private static readonly Duration MinErrorInterval = Duration.FromSeconds(10);
|
||||||
private static readonly Duration IntervalFromStartup = Duration.FromMinutes(5);
|
private static readonly Duration IntervalFromStartup = Duration.FromMinutes(2);
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
private readonly BotConfig _botConfig;
|
private readonly BotConfig _botConfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user