Skip messages before current user ID is established
This commit is contained in:
parent
20789411f6
commit
0eb2e8be6f
@ -260,7 +260,7 @@ namespace PluralKit.Bot
|
|||||||
public async Task HandleMessage(SocketMessage arg)
|
public async Task HandleMessage(SocketMessage arg)
|
||||||
{
|
{
|
||||||
var shard = _client.GetShardFor((arg.Channel as IGuildChannel)?.Guild);
|
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
|
return; // Discard messages while the bot "catches up" to avoid unnecessary CPU pressure causing timeouts
|
||||||
|
|
||||||
RegisterMessageMetrics(arg);
|
RegisterMessageMetrics(arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user