using System;
using System.Threading.Tasks;
namespace Discord.WebSocket
{
public partial class DiscordShardedClient
{
//General
/// Fired when a shard is connected to the Discord gateway.
public event Func ShardConnected
{
add { _shardConnectedEvent.Add(value); }
remove { _shardConnectedEvent.Remove(value); }
}
private readonly AsyncEvent> _shardConnectedEvent = new AsyncEvent>();
/// Fired when a shard is disconnected from the Discord gateway.
public event Func ShardDisconnected
{
add { _shardDisconnectedEvent.Add(value); }
remove { _shardDisconnectedEvent.Remove(value); }
}
private readonly AsyncEvent> _shardDisconnectedEvent = new AsyncEvent>();
/// Fired when a guild data for a shard has finished downloading.
public event Func ShardReady
{
add { _shardReadyEvent.Add(value); }
remove { _shardReadyEvent.Remove(value); }
}
private readonly AsyncEvent> _shardReadyEvent = new AsyncEvent>();
/// Fired when a shard receives a heartbeat from the Discord gateway.
public event Func ShardLatencyUpdated
{
add { _shardLatencyUpdatedEvent.Add(value); }
remove { _shardLatencyUpdatedEvent.Remove(value); }
}
private readonly AsyncEvent> _shardLatencyUpdatedEvent = new AsyncEvent>();
}
}