Browse Source

fixed stuffz

pull/1383/head
Casino Boyale 6 years ago
parent
commit
edee55b196
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/Discord.Net.WebSocket/DiscordSocketApiClient.cs
  2. +2
    -2
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 2
- 2
src/Discord.Net.WebSocket/DiscordSocketApiClient.cs View File

@@ -215,7 +215,7 @@ namespace Discord.API
await _sentGatewayMessageEvent.InvokeAsync(opCode).ConfigureAwait(false); await _sentGatewayMessageEvent.InvokeAsync(opCode).ConfigureAwait(false);
} }


public async Task SendIdentifyAsync(IActivity activity = null, UserStatus status = UserStatus.Online, int largeThreshold = 100, int shardID = 0, int totalShards = 1, RequestOptions options = null)
public async Task SendIdentifyAsync(bool guildSubscriptions, IActivity activity = null, UserStatus status = UserStatus.Online, int largeThreshold = 100, int shardID = 0, int totalShards = 1, RequestOptions options = null)
{ {
var gameModel = new Game(); var gameModel = new Game();
// Discord only accepts rich presence over RPC, don't even bother building a payload // Discord only accepts rich presence over RPC, don't even bother building a payload
@@ -244,7 +244,7 @@ namespace Discord.API
Token = AuthToken, Token = AuthToken,
Properties = props, Properties = props,
LargeThreshold = largeThreshold, LargeThreshold = largeThreshold,
Presence = args
Presence = args,
GuildSubscriptions = guildSubscriptions GuildSubscriptions = guildSubscriptions
}; };
if (totalShards > 1) if (totalShards > 1)


+ 2
- 2
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -246,7 +246,7 @@ namespace Discord.WebSocket
else else
{ {
await _gatewayLogger.DebugAsync("Identifying").ConfigureAwait(false); await _gatewayLogger.DebugAsync("Identifying").ConfigureAwait(false);
await ApiClient.SendIdentifyAsync(Activity, Status, shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
await ApiClient.SendIdentifyAsync(_guildSubscriptions, Activity, Status, shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
} }


//Wait for READY //Wait for READY
@@ -509,7 +509,7 @@ namespace Discord.WebSocket
_sessionId = null; _sessionId = null;
_lastSeq = 0; _lastSeq = 0;


await ApiClient.SendIdentifyAsync(Activity, Status, shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
await ApiClient.SendIdentifyAsync(_guildSubscriptions, Activity, Status, shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false);
} }
break; break;
case GatewayOpCode.Reconnect: case GatewayOpCode.Reconnect:


Loading…
Cancel
Save