Add Checkem Command
This commit is contained in:
parent
ee4c09e7ea
commit
1295ed6206
7 changed files with 211 additions and 8 deletions
38
Geekbot.net/Modules/CheckEm.cs
Normal file
38
Geekbot.net/Modules/CheckEm.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
|
||||
namespace Geekbot.net.Modules
|
||||
{
|
||||
public class CheckEm : ModuleBase
|
||||
{
|
||||
private readonly Random rnd;
|
||||
private readonly ICheckEmImageProvider checkEmImages;
|
||||
public CheckEm(Random RandomClient, ICheckEmImageProvider checkEmImages)
|
||||
{
|
||||
this.rnd = RandomClient;
|
||||
this.checkEmImages = checkEmImages;
|
||||
}
|
||||
[Command("checkem", RunMode = RunMode.Async), Summary("Check for dubs")]
|
||||
public async Task MuhDubs()
|
||||
{
|
||||
try
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine($"Check em {Context.User.Mention}");
|
||||
sb.AppendLine($"**{rnd.Next(100000, 99999999)}**");
|
||||
sb.AppendLine(checkEmImages.GetRandomCheckEmPic());
|
||||
|
||||
await ReplyAsync(sb.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,8 +7,8 @@ namespace Geekbot.net.Modules
|
|||
{
|
||||
public class Fortune : ModuleBase
|
||||
{
|
||||
private readonly IFortunes fortunes;
|
||||
public Fortune(IFortunes fortunes)
|
||||
private readonly IFortunesProvider fortunes;
|
||||
public Fortune(IFortunesProvider fortunes)
|
||||
{
|
||||
this.fortunes = fortunes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue