Skip to content

Commit 4b832cc

Browse files
Merge pull request #65 from nullinside-development-group/feature/BetterLogging
Feature/better logging
2 parents 41bc7a5 + 4374775 commit 4b832cc

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/Nullinside.Api.TwitchBot.Tests/ChatRules/BestCheapViewersTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public class BestCheapViewersTests : AChatRuleUnitTestBase<BestCheapViewers> {
1515
/// </summary>
1616
/// <param name="badString">The string that should fail.</param>
1717
[Test]
18+
[TestCase("B͐est vi̯ewers o͎n on streamboo .com ( remove the space ) @9F3Wnft0")]
19+
[TestCase("Ch̚eͅap viewers on *** @STGPMoLg")]
20+
[TestCase("C̭heap viewe͌rs on̆ *** @R1QXrXPM")]
21+
[TestCase("C̭heap viewe͌rs on̆ vwrpro.ru @8v2JcQFL")]
1822
[TestCase("C\u032dheap viewe\u034crs on\u0306 vwrpro.ru @8v2JcQFL")]
1923
[TestCase("Ch\u031ae\u0345ap viewers on *** @STGPMoLg")]
2024
[TestCase("Best\u036e vie\u0350wers \u0337on ***")]

src/Nullinside.Api.TwitchBot/ChatRules/Discord.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ namespace Nullinside.Api.TwitchBot.ChatRules;
1313
/// </summary>
1414
public class Discord : AChatRule {
1515
private readonly string[] KNOWN_PHRASES = [
16-
"add me on discord",
17-
"my username is",
18-
"my discord username is",
16+
"add me",
17+
"message me",
18+
"chat with me",
19+
"my discord username",
20+
"my username",
1921
"connect on discord"
2022
];
2123

src/Nullinside.Api.TwitchBot/ChatRules/TwitchChatMessageMonitorConsumer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
using Microsoft.EntityFrameworkCore;
66

7+
using Mysqlx.Expr;
8+
79
using Nullinside.Api.Common.Twitch;
810
using Nullinside.Api.Model;
911
using Nullinside.Api.Model.Ddl;
@@ -160,7 +162,7 @@ private async void MainLoop() {
160162
}
161163
}
162164
catch (Exception e) {
163-
LOG.Error($"{channel}: Failed to evaluate rule", e);
165+
LOG.Error($"{channel}: Failed to evaluate rule on {message.Username}({message.UserId}): {message.Message}", e);
164166
}
165167
}
166168
}

0 commit comments

Comments
 (0)