Esempio n. 1
0
    public void JoinVoice(string guildId, string channelId)
    {
        var payload = new GatewayPayload
        {
            OpCode = GatewayOpCode.VoiceStateUpdate,
            Data   = new VoiceStateUpdateRequest
            {
                guild_id   = guildId,
                channel_id = channelId,
                self_mute  = false,
                self_deaf  = false
            }
        };

        gateway.Send(payload);
    }
Esempio n. 2
0
        private void OnInitialHeartbeatACK()
        {
            Messenger.RemoveListener(DiscordEvent.HeartbeatACK, OnInitialHeartbeatACK);
            Debug.Log("Initial ACK received. Proceed to Identify");

            //Identify
            var payload = new GatewayPayload
            {
                OpCode = GatewayOpCode.Identify,
                Data   = new IdentifyEventData
                {
                    token      = Token,
                    properties = new ConnectionProperties
                    {
                        os      = "windows",
                        browser = "xliii",
                        device  = "xliii"
                    }
                }
            };

            gateway.Send(payload);
        }