Renamed LoggedIn event to Ready
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Discord
|
|||||||
{
|
{
|
||||||
public partial class DiscordClient
|
public partial class DiscordClient
|
||||||
{
|
{
|
||||||
public event EventHandler LoggedIn = delegate { };
|
public event EventHandler Ready = delegate { };
|
||||||
//public event EventHandler<DisconnectedEventArgs> LoggedOut = delegate { };
|
//public event EventHandler<DisconnectedEventArgs> LoggedOut = delegate { };
|
||||||
public event EventHandler<ChannelEventArgs> ChannelCreated = delegate { };
|
public event EventHandler<ChannelEventArgs> ChannelCreated = delegate { };
|
||||||
public event EventHandler<ChannelEventArgs> ChannelDestroyed = delegate { };
|
public event EventHandler<ChannelEventArgs> ChannelDestroyed = delegate { };
|
||||||
@@ -31,8 +31,8 @@ namespace Discord
|
|||||||
public event EventHandler<UserUpdatedEventArgs> UserUpdated = delegate { };
|
public event EventHandler<UserUpdatedEventArgs> UserUpdated = delegate { };
|
||||||
public event EventHandler<UserEventArgs> UserUnbanned = delegate { };
|
public event EventHandler<UserEventArgs> UserUnbanned = delegate { };
|
||||||
|
|
||||||
private void OnLoggedIn()
|
private void OnReady()
|
||||||
=> OnEvent(LoggedIn);
|
=> OnEvent(Ready);
|
||||||
/*private void OnLoggedOut(bool wasUnexpected, Exception ex)
|
/*private void OnLoggedOut(bool wasUnexpected, Exception ex)
|
||||||
=> OnEvent(LoggedOut, new DisconnectedEventArgs(wasUnexpected, ex));*/
|
=> OnEvent(LoggedOut, new DisconnectedEventArgs(wasUnexpected, ex));*/
|
||||||
|
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ namespace Discord
|
|||||||
}
|
}
|
||||||
|
|
||||||
SendStatus();
|
SendStatus();
|
||||||
OnLoggedIn();
|
OnReady();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,6 +484,8 @@ namespace Discord
|
|||||||
//Global
|
//Global
|
||||||
case "READY":
|
case "READY":
|
||||||
{
|
{
|
||||||
|
//TODO: None of this is really threadsafe - should only replace the cache collections when they have been fully populated
|
||||||
|
|
||||||
var data = e.Payload.ToObject<ReadyEvent>(Serializer);
|
var data = e.Payload.ToObject<ReadyEvent>(Serializer);
|
||||||
|
|
||||||
int channelCount = 0;
|
int channelCount = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user