geekbot/Geekbot.net/Commands/Randomness/Fortune.cs

25 lines
654 B
C#
Raw Normal View History

2017-09-15 22:56:03 +02:00
using System.Threading.Tasks;
2017-09-15 00:31:13 +02:00
using Discord.Commands;
2017-10-12 16:34:10 +02:00
using Geekbot.net.Lib;
using Geekbot.net.Lib.Media;
2017-09-15 00:31:13 +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)]
2017-10-12 16:34:10 +02:00
[Remarks(CommandCategories.Randomness)]
2017-09-15 22:56:03 +02:00
[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
}