From cd921285c9749e987cfdc65651334fe292aeae4d Mon Sep 17 00:00:00 2001 From: Chris Darnell Date: Sat, 1 May 2021 01:59:48 -0700 Subject: [PATCH] Slight modifications to NotFacts and Snapple --- StarsiegeBot/Raven/NotFacts.cs | 8 ++++---- StarsiegeBot/Raven/SnappleFacts.cs | 1 - StarsiegeBot/StarsiegeBot.csproj | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/StarsiegeBot/Raven/NotFacts.cs b/StarsiegeBot/Raven/NotFacts.cs index e2b3827..3ab931a 100644 --- a/StarsiegeBot/Raven/NotFacts.cs +++ b/StarsiegeBot/Raven/NotFacts.cs @@ -30,17 +30,17 @@ namespace StarsiegeBot if (!IsEnabled) return; await ctx.TriggerTypingAsync(); - + string output; notFactID--; try { - await ctx.RespondAsync(notfacts[notFactID]); - return; + output = notfacts[notFactID]; } catch (Exception) { - await ctx.RespondAsync(notfacts[Program.rnd.Next(0, notfacts.Count)]); + output = notfacts[Program.rnd.Next(0, notfacts.Count)]; } + await ctx.RespondAsync(StartEmbed(output)); } [Command("count"), Aliases("c"), Description("Get a count of the NotFacts")] diff --git a/StarsiegeBot/Raven/SnappleFacts.cs b/StarsiegeBot/Raven/SnappleFacts.cs index 90304ff..3a0e1d1 100644 --- a/StarsiegeBot/Raven/SnappleFacts.cs +++ b/StarsiegeBot/Raven/SnappleFacts.cs @@ -40,7 +40,6 @@ namespace StarsiegeBot { // attempt to get the desired fact. output = facts[snapId]; - return; } catch (Exception) { diff --git a/StarsiegeBot/StarsiegeBot.csproj b/StarsiegeBot/StarsiegeBot.csproj index 5f52148..f6cdfa8 100644 --- a/StarsiegeBot/StarsiegeBot.csproj +++ b/StarsiegeBot/StarsiegeBot.csproj @@ -22,6 +22,21 @@ Never + + Always + + + Always + + + Always + + + Always + + + Always +