From fe37980c2606249379fb97e11f092d826e1ab490 Mon Sep 17 00:00:00 2001 From: Nikolay Kochulin Date: Sun, 17 Nov 2019 11:30:23 +0000 Subject: [PATCH] Make stars actually work --- JetKarmaBot/Commands/AwardCommand.cs | 4 ++-- JetKarmaBot/Commands/LeaderboardCommand.cs | 4 ++-- JetKarmaBot/Commands/StatusCommand.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/JetKarmaBot/Commands/AwardCommand.cs b/JetKarmaBot/Commands/AwardCommand.cs index 23072c6..49c7066 100644 --- a/JetKarmaBot/Commands/AwardCommand.cs +++ b/JetKarmaBot/Commands/AwardCommand.cs @@ -91,12 +91,12 @@ namespace JetKarmaBot.Commands var text = args.Message.Text; string awardTypeAcc, awardTypeSym; - sbyte awardTypeId = 0; + sbyte? awardTypeId; if (awardTypeText == null || awardTypeText == "star") { awardTypeAcc = currentLocale["jetkarmabot.star.accusative"]; awardTypeSym = "★"; - awardTypeId = 0; + awardTypeId = null; } else { diff --git a/JetKarmaBot/Commands/LeaderboardCommand.cs b/JetKarmaBot/Commands/LeaderboardCommand.cs index 940b82c..349c466 100644 --- a/JetKarmaBot/Commands/LeaderboardCommand.cs +++ b/JetKarmaBot/Commands/LeaderboardCommand.cs @@ -28,10 +28,10 @@ namespace JetKarmaBot.Commands string response; string awardTypeSym; - sbyte awardTypeId; + sbyte? awardTypeId; if (string.IsNullOrWhiteSpace(awardTypeName) || awardTypeName == "star") { - awardTypeId = 0; + awardTypeId = null; awardTypeSym = "★"; } else diff --git a/JetKarmaBot/Commands/StatusCommand.cs b/JetKarmaBot/Commands/StatusCommand.cs index 2ecc55c..9b493e5 100644 --- a/JetKarmaBot/Commands/StatusCommand.cs +++ b/JetKarmaBot/Commands/StatusCommand.cs @@ -54,11 +54,11 @@ namespace JetKarmaBot.Commands } else { - sbyte awardTypeId; + sbyte? awardTypeId; string awardTypeSym; if (awardTypeName == "star") { - awardTypeId = 0; + awardTypeId = null; awardTypeSym = "★"; } else