Skip to content

Commit 7cb0b41

Browse files
Adding logging for chat client disconnects
Have to figure out why the disconnects are occuring.
1 parent 7f2f783 commit 7cb0b41

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,21 @@ private async Task<bool> Connect() {
300300
client.OnMessageReceived += TwitchChatClient_OnMessageReceived;
301301
client.OnUserBanned += TwitchChatClient_OnUserBanned;
302302
client.OnRaidNotification += TwitchChatClient_OnRaidNotification;
303+
client.OnDisconnected += (sender, args) => {
304+
LOG.Error("Twitch Client Disconnected");
305+
};
306+
client.OnConnectionError += (sender, args) => {
307+
LOG.Error($"Twitch Client Connection Error: {args.Error.Message}");
308+
};
309+
client.OnError += (sender, args) => {
310+
LOG.Error($"Twitch Client Error: {args.Exception.Message}");
311+
};
312+
client.OnIncorrectLogin += (sender, args) => {
313+
LOG.Error($"Twitch Client Incorrect Login: {args.Exception.Message}");
314+
};
315+
client.OnNoPermissionError += (sender, args) => {
316+
LOG.Error("Twitch Client No Permission Error");
317+
};
303318
}
304319

305320
try {

0 commit comments

Comments
 (0)