feature: support guild subscription opt-out (#1386)

This commit is contained in:
Kieran Boyle
2019-10-01 20:51:02 +01:00
committed by Christopher F
parent 3d39704c6c
commit 0d54207a27
4 changed files with 16 additions and 6 deletions

View File

@@ -215,7 +215,7 @@ namespace Discord.API
await _sentGatewayMessageEvent.InvokeAsync(opCode).ConfigureAwait(false);
}
public async Task SendIdentifyAsync(int largeThreshold = 100, int shardID = 0, int totalShards = 1, RequestOptions options = null)
public async Task SendIdentifyAsync(int largeThreshold = 100, int shardID = 0, int totalShards = 1, bool guildSubscriptions = true, RequestOptions options = null)
{
options = RequestOptions.CreateOrClone(options);
var props = new Dictionary<string, string>
@@ -226,7 +226,8 @@ namespace Discord.API
{
Token = AuthToken,
Properties = props,
LargeThreshold = largeThreshold
LargeThreshold = largeThreshold,
GuildSubscriptions = guildSubscriptions
};
if (totalShards > 1)
msg.ShardingParams = new int[] { shardID, totalShards };