fix: crash when no prefixes in config file

This commit is contained in:
rladenson 2025-01-01 20:47:24 -07:00
parent d0515645d0
commit 4bfee8a090
3 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@ public class MessageEdited: IEventHandler<MessageUpdateEvent>
try
{
await _proxy.HandleIncomingMessage(equivalentEvt, ctx, allowAutoproxy: false, guild: guild,
channel: channel, botPermissions: botPermissions, prefix: (_config.Prefixes[0] ?? BotConfig.DefaultPrefixes[0]));
channel: channel, botPermissions: botPermissions, prefix: (_config.Prefixes?[0] ?? BotConfig.DefaultPrefixes[0]));
}
// Catch any failed proxy checks so they get ignored in the global error handler
catch (ProxyService.ProxyChecksFailedException) { }