Наследование: IWebSocketMessage
Пример #1
0
        public void SendIdentify(string token)
        {
            var props = new Dictionary<string, string>
            {
                ["$device"] = "Discord.Net"
            };
            var msg = new IdentifyCommand()
            {
                Token = token,
                Properties = props, 
                LargeThreshold = _config.LargeThreshold,
                UseCompression = true
            };
			QueueMessage(msg);
		}
Пример #2
0
        public void SendIdentify(string token)
        {
            var props = new Dictionary<string, string>
            {
                ["$device"] = "Discord.Net"
            };
            var msg = new IdentifyCommand()
            {
                Version = 3,
                Token = token,
                Properties = props, 
                LargeThreshold = _client.Config.UseLargeThreshold ? 100 : (int?)null,
                UseCompression = true
            };
			QueueMessage(msg);
		}
Пример #3
0
        public void SendIdentify(string token, int shardId = 0, int totalShards = 1)
        {
            var props = new Dictionary<string, string>
            {
                ["$device"] = "Discord.Net"
            };
            var msg = new IdentifyCommand()
            {
                Token = token,
                Properties = props, 
                LargeThreshold = _config.LargeThreshold,
                UseCompression = true,
                ShardingParams = new int[] { shardId, totalShards },
            };

            QueueMessage(msg);
		}