2017-09-15 22:56:03 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2017-09-15 00:31:13 +02:00
|
|
|
|
using Discord.Commands;
|
2017-09-27 17:18:31 +02:00
|
|
|
|
using Geekbot.net.Lib.Media;
|
2017-09-15 00:31:13 +02:00
|
|
|
|
|
2018-05-03 00:56:06 +02:00
|
|
|
|
namespace Geekbot.net.Commands.Randomness
|
2017-09-15 00:31:13 +02:00
|
|
|
|
{
|
|
|
|
|
public class Fortune : ModuleBase
|
|
|
|
|
{
|
2017-12-29 01:53:50 +01:00
|
|
|
|
private readonly IFortunesProvider _fortunes;
|
2017-09-15 22:56:03 +02:00
|
|
|
|
|
2017-09-15 12:58:49 +02:00
|
|
|
|
public Fortune(IFortunesProvider fortunes)
|
2017-09-15 00:31:13 +02:00
|
|
|
|
{
|
2017-12-29 01:53:50 +01:00
|
|
|
|
_fortunes = fortunes;
|
2017-09-15 00:31:13 +02:00
|
|
|
|
}
|
2017-09-15 22:56:03 +02:00
|
|
|
|
|
|
|
|
|
[Command("fortune", RunMode = RunMode.Async)]
|
|
|
|
|
[Summary("Get a random fortune")]
|
2017-09-15 00:31:13 +02:00
|
|
|
|
public async Task GetAFortune()
|
|
|
|
|
{
|
2017-12-29 01:53:50 +01:00
|
|
|
|
await ReplyAsync(_fortunes.GetRandomFortune());
|
2017-09-15 00:31:13 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-09-15 22:56:03 +02:00
|
|
|
|
}
|