mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Don't process messages until we're fully connected to shard zero
This commit is contained in:
parent
18e4d7c9ac
commit
d47e7e7a06
1 changed files with 5 additions and 0 deletions
|
|
@ -171,6 +171,11 @@ namespace PluralKit.Bot
|
|||
|
||||
private async Task MessageReceived(SocketMessage _arg)
|
||||
{
|
||||
// _client.CurrentUser will be null if we've connected *some* shards but not shard #0 yet
|
||||
// This will cause an error in WebhookCacheServices so we just workaround and don't process any messages
|
||||
// until we properly connect. TODO: can we do this without chucking away a bunch of messages?
|
||||
if (_client.CurrentUser == null) return;
|
||||
|
||||
using (SentrySdk.PushScope())
|
||||
using (var serviceScope = _services.CreateScope())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue