diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index ec32a125..73af28cc 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -260,7 +260,7 @@ namespace PluralKit.Bot public async Task HandleMessage(SocketMessage arg) { var shard = _client.GetShardFor((arg.Channel as IGuildChannel)?.Guild); - if (shard.ConnectionState != ConnectionState.Connected) + if (shard.ConnectionState != ConnectionState.Connected || _client.CurrentUser == null) return; // Discard messages while the bot "catches up" to avoid unnecessary CPU pressure causing timeouts RegisterMessageMetrics(arg);