Fix cards against humanity

This commit is contained in:
2022-07-31 01:38:08 +02:00
parent ba5a6c16e0
commit c284d5877b

View File

@@ -59,14 +59,18 @@ namespace LaDOSE.DiscordBot.Command
var q = Questions[rnd.Next(Questions.Count - 1)]; var q = Questions[rnd.Next(Questions.Count - 1)];
var s = q.Split('_', StringSplitOptions.RemoveEmptyEntries); var s = q.Split('_', StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < s.Length - 1; i++) if (s.Length == 1)
{ {
response += s[i] + Answers[rnd.Next(Answers.Count - 1)]; response += q + " " + Answers[rnd.Next(Answers.Count - 1)];
}
else
{
for (int i = 0; i < s.Length - 1; i++)
{
response += s[i] + Answers[rnd.Next(Answers.Count - 1)];
}
response += s[s.Length - 1];
} }
response += s[s.Length-1];
await ctx.RespondAsync(response); await ctx.RespondAsync(response);
} }