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
|
|
|
|
|
2017-10-02 21:57:48 +02:00
|
|
|
|
namespace Geekbot.net.Commands
|
2017-09-15 00:31:13 +02:00
|
|
|
|
{
|
|
|
|
|
public class Fortune : ModuleBase
|
|
|
|
|
{
|
2017-09-15 12:58:49 +02: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
|
|
|
|
{
|
|
|
|
|
this.fortunes = fortunes;
|
|
|
|
|
}
|
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()
|
|
|
|
|
{
|
|
|
|
|
await ReplyAsync(fortunes.GetRandomFortune());
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-09-15 22:56:03 +02:00
|
|
|
|
}
|