/// <summary> /// Invoked when a Heartbeat Acknowledged event is fired from Discord's WebSocket server. /// </summary> /// <param name="response">JSON response.</param> public void HeartbeatAcknowledged(string response) { HeartbeatResponse heartbeat = serializer.Deserialize <HeartbeatResponse>(response); DiscordOnHeartbeatEventArgs args = new DiscordOnHeartbeatEventArgs() { Heartbeat = heartbeat }; OnHeartbeatNotify(args); }
protected void OnHeartbeatNotify(DiscordOnHeartbeatEventArgs e) { EventHandler <DiscordOnHeartbeatEventArgs> handler = OnHeartbeat; handler?.Invoke(this, e); }