Skip to content

Commit

Permalink
Merge pull request #265 from AoshiW/fix-typo
Browse files Browse the repository at this point in the history
fix disconnect event type in TwitchClient
  • Loading branch information
Mahsaap authored Jun 19, 2024
2 parents de39bd0 + 2ffc7f7 commit 5677f50
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TwitchLib.Client.Test/TwitchClientEventTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public async Task ClientRaisesOnDisconnected()
{
var client = new TwitchClient(_mockClient);

await MyAssert.RaisesAsync<OnDisconnectedEventArgs>(
await MyAssert.RaisesAsync<OnDisconnectedArgs>(
h => client.OnDisconnected += h,
h => client.OnDisconnected -= h,
async () =>
Expand Down
2 changes: 1 addition & 1 deletion TwitchLib.Client/Interfaces/ITwitchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public interface ITwitchClient
/// <summary>
/// Fires when bot has disconnected.
/// </summary>
event AsyncEventHandler<OnDisconnectedEventArgs>? OnDisconnected;
event AsyncEventHandler<OnDisconnectedArgs>? OnDisconnected;

/// <summary>
/// Forces when bot suffers connection error.
Expand Down
4 changes: 2 additions & 2 deletions TwitchLib.Client/TwitchClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public class TwitchClient : ITwitchClient
public event AsyncEventHandler<OnUserLeftArgs>? OnUserLeft;

/// <inheritdoc/>
public event AsyncEventHandler<OnDisconnectedEventArgs>? OnDisconnected;
public event AsyncEventHandler<OnDisconnectedArgs>? OnDisconnected;

/// <inheritdoc/>
public event AsyncEventHandler<OnConnectionErrorArgs>? OnConnectionError;
Expand Down Expand Up @@ -652,7 +652,7 @@ private Task _client_OnFatality(object? sender, OnFatalErrorEventArgs e)
/// <param name="e">The <see cref="OnDisconnectedEventArgs" /> instance containing the event data.</param>
private Task _client_OnDisconnected(object? sender, OnDisconnectedEventArgs e)
{
return OnDisconnected.TryInvoke(sender, e);
return OnDisconnected.TryInvoke(sender, new(TwitchUsername));
}

/// <summary>
Expand Down

0 comments on commit 5677f50

Please sign in to comment.