Removed all local copies of Random rnd in favor of using Program.rnd. Fixed lack of DM command usage. Coverted more responses to use DiscordEmbedBuilder

This commit is contained in:
Christopher Darnell committed 2021-04-29 05:02:17 -07:00
1 parent 0479d443b8
commit 7cefceb48e
10 files changed
+115 -86

No files matched your search

+2 -3
View File
@@ -8,8 +8,7 @@ namespace StarsiegeBot
{
class SnappleFacts : BaseCommandModule
{
private string[] facts;
private Random rnd = new Random();
private readonly string[] facts;
[Command("snapple"), Description("Get a Snapple \"Real Fact\".")]
public async Task Snapplefact(CommandContext ctx, [Description("[Optional] A Snapple Fact ID")]int snapId = -1)
@@ -17,7 +16,7 @@ namespace StarsiegeBot
if (snapId == -1)
{
await ctx.TriggerTypingAsync();
await ctx.RespondAsync(facts[rnd.Next(0, facts.Length)]);
await ctx.RespondAsync(facts[Program.rnd.Next(0, facts.Length)]);
}
else
{