Adding Fortunes
This commit is contained in:
parent
40bbef9cd8
commit
35064cf90b
5 changed files with 9838 additions and 5 deletions
22
Geekbot.net/Modules/Fortune.cs
Normal file
22
Geekbot.net/Modules/Fortune.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue