Adding Fortunes

This commit is contained in:
Runebaas 2017-09-15 00:31:13 +02:00
parent 40bbef9cd8
commit 35064cf90b
5 changed files with 9838 additions and 5 deletions

View file

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