geekbot/Geekbot.net/Modules/Fortune.cs

23 lines
No EOL
565 B
C#

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