Browse Source

Renamed LoggedIn event to Ready

pull/36/head
RogueException 9 years ago
parent
commit
b9d68b723a
2 changed files with 6 additions and 4 deletions
  1. +3
    -3
      src/Discord.Net/DiscordClient.Events.cs
  2. +3
    -1
      src/Discord.Net/DiscordClient.cs

+ 3
- 3
src/Discord.Net/DiscordClient.Events.cs View File

@@ -5,7 +5,7 @@ namespace Discord
{
public partial class DiscordClient
{
public event EventHandler LoggedIn = delegate { };
public event EventHandler Ready = delegate { };
//public event EventHandler<DisconnectedEventArgs> LoggedOut = delegate { };
public event EventHandler<ChannelEventArgs> ChannelCreated = delegate { };
public event EventHandler<ChannelEventArgs> ChannelDestroyed = delegate { };
@@ -31,8 +31,8 @@ namespace Discord
public event EventHandler<UserUpdatedEventArgs> UserUpdated = delegate { };
public event EventHandler<UserEventArgs> UserUnbanned = delegate { };

private void OnLoggedIn()
=> OnEvent(LoggedIn);
private void OnReady()
=> OnEvent(Ready);
/*private void OnLoggedOut(bool wasUnexpected, Exception ex)
=> OnEvent(LoggedOut, new DisconnectedEventArgs(wasUnexpected, ex));*/



+ 3
- 1
src/Discord.Net/DiscordClient.cs View File

@@ -268,7 +268,7 @@ namespace Discord
}

SendStatus();
OnLoggedIn();
OnReady();
}
}

@@ -484,6 +484,8 @@ namespace Discord
//Global
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);

int channelCount = 0;


Loading…
Cancel
Save