geekbot/Geekbot.net/Commands/Fortune.cs

25 lines
No EOL
643 B
C#

using System.Threading.Tasks;
using Discord.Commands;
using Geekbot.net.Lib;
using Geekbot.net.Lib.Media;
namespace Geekbot.net.Commands
{
public class Fortune : ModuleBase
{
private readonly IFortunesProvider _fortunes;
public Fortune(IFortunesProvider fortunes)
{
_fortunes = fortunes;
}
[Command("fortune", RunMode = RunMode.Async)]
[Remarks(CommandCategories.Randomness)]
[Summary("Get a random fortune")]
public async Task GetAFortune()
{
await ReplyAsync(_fortunes.GetRandomFortune());
}
}
}