using DiscordRPC.Message; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DiscordRPC.Events { /// /// Called when the Discord Client is ready to send and receive messages. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnReadyEvent(object sender, ReadyMessage args); /// /// Called when connection to the Discord Client is lost. The connection will remain close and unready to accept messages until the Ready event is called again. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnCloseEvent(object sender, CloseMessage args); /// /// Called when a error has occured during the transmission of a message. For example, if a bad Rich Presence payload is sent, this event will be called explaining what went wrong. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnErrorEvent(object sender, ErrorMessage args); /// /// Called when the Discord Client has updated the presence. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnPresenceUpdateEvent(object sender, PresenceMessage args); /// /// Called when the Discord Client has subscribed to an event. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnSubscribeEvent(object sender, SubscribeMessage args); /// /// Called when the Discord Client has unsubscribed from an event. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnUnsubscribeEvent(object sender, UnsubscribeMessage args); /// /// Called when the Discord Client wishes for this process to join a game. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnJoinEvent(object sender, JoinMessage args); /// /// Called when the Discord Client wishes for this process to spectate a game. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnSpectateEvent(object sender, SpectateMessage args); /// /// Called when another discord user requests permission to join this game. /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnJoinRequestedEvent(object sender, JoinRequestMessage args); /// /// The connection to the discord client was succesfull. This is called before . /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnConnectionEstablishedEvent(object sender, ConnectionEstablishedMessage args); /// /// Failed to establish any connection with discord. Discord is potentially not running? /// /// The Discord client handler that sent this event /// The arguments supplied with the event public delegate void OnConnectionFailedEvent(object sender, ConnectionFailedMessage args); /// /// A RPC Message is received. /// /// The handler that sent this event /// The raw message from the RPC public delegate void OnRpcMessageEvent(object sender, IMessage msg); }