geekbot/Geekbot.net/Commands/EightBall.cs

51 lines
1.4 KiB
C#
Raw Normal View History

2017-04-13 00:03:03 +02:00
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Discord.Commands;
2017-10-12 16:34:10 +02:00
using Geekbot.net.Lib;
2017-04-13 00:03:03 +02:00
namespace Geekbot.net.Commands
2017-04-13 00:03:03 +02:00
{
public class EightBall : ModuleBase
{
private readonly Random rnd;
2017-09-15 22:56:03 +02:00
public EightBall(Random RandomClient)
2017-04-25 17:27:11 +02:00
{
rnd = RandomClient;
2017-04-25 17:27:11 +02:00
}
2017-09-15 22:56:03 +02:00
[Command("8ball", RunMode = RunMode.Async)]
2017-10-12 16:34:10 +02:00
[Remarks(CommandCategories.Randomness)]
2017-09-15 22:56:03 +02:00
[Summary("Ask 8Ball a Question.")]
public async Task Ball([Remainder] [Summary("Question")] string echo)
2017-04-13 00:03:03 +02:00
{
2017-09-15 22:56:03 +02:00
var replies = new List<string>
{
2017-04-13 00:03:03 +02:00
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes, definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
"Outlook good",
"Yes",
"Signs point to yes",
"Reply hazy try again",
"Ask again later",
"Better not tell you now",
"Cannot predict now",
"Concentrate and ask again",
"Don't count on it",
"My reply is no",
"My sources say no",
"Outlook not so good",
2017-09-15 22:56:03 +02:00
"Very doubtful"
};
2017-04-13 00:03:03 +02:00
var answer = rnd.Next(replies.Count);
2017-04-13 00:03:03 +02:00
await ReplyAsync(replies[answer]);
}
}
}