fix: Rollback Activities to Game (#1702)
This commit is contained in:
@@ -216,7 +216,7 @@ namespace Discord.API
|
||||
await _sentGatewayMessageEvent.InvokeAsync(opCode).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task SendIdentifyAsync(int largeThreshold = 100, int shardID = 0, int totalShards = 1, bool guildSubscriptions = true, GatewayIntents? gatewayIntents = null, (UserStatus, bool, long?, GameModel[])? presence = null, RequestOptions options = null)
|
||||
public async Task SendIdentifyAsync(int largeThreshold = 100, int shardID = 0, int totalShards = 1, bool guildSubscriptions = true, GatewayIntents? gatewayIntents = null, (UserStatus, bool, long?, GameModel)? presence = null, RequestOptions options = null)
|
||||
{
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
var props = new Dictionary<string, string>
|
||||
@@ -246,7 +246,7 @@ namespace Discord.API
|
||||
Status = presence.Value.Item1,
|
||||
IsAFK = presence.Value.Item2,
|
||||
IdleSince = presence.Value.Item3,
|
||||
Activities = presence.Value.Item4
|
||||
Game = presence.Value.Item4,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace Discord.API
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
await SendGatewayAsync(GatewayOpCode.Heartbeat, lastSeq, options: options).ConfigureAwait(false);
|
||||
}
|
||||
public async Task SendStatusUpdateAsync(UserStatus status, bool isAFK, long? since, GameModel[] game, RequestOptions options = null)
|
||||
public async Task SendStatusUpdateAsync(UserStatus status, bool isAFK, long? since, GameModel game, RequestOptions options = null)
|
||||
{
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
var args = new StatusUpdateParams
|
||||
@@ -276,7 +276,7 @@ namespace Discord.API
|
||||
Status = status,
|
||||
IdleSince = since,
|
||||
IsAFK = isAFK,
|
||||
Activities = game
|
||||
Game = game
|
||||
};
|
||||
options.BucketId = GatewayBucket.Get(GatewayBucketType.PresenceUpdate).Id;
|
||||
await SendGatewayAsync(GatewayOpCode.StatusUpdate, args, options: options).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user