Geekbot logo and roll command

This commit is contained in:
dboerlage 2017-04-12 22:43:52 +02:00
parent b16bec8517
commit 315526c32b
No known key found for this signature in database
GPG key ID: BDA07B7D3FCF147F
3 changed files with 36 additions and 12 deletions

View file

@ -8,7 +8,6 @@ namespace Geekbot.net.Modules
[Command("ping"), Summary("Pong.")]
public async Task Say()
{
// ReplyAsync is a method on ModuleBase
await ReplyAsync("Pong");
}
}

View file

@ -0,0 +1,25 @@
using System;
using System.Threading.Tasks;
using Discord.Commands;
namespace Geekbot.net.Modules
{
public class Roll : ModuleBase
{
[Command("roll"), Summary("Roll a number between 1 and 100.")]
public async Task RollCommand()
{
var rnd = new Random();
var number = rnd.Next(1, 100);
await ReplyAsync(Context.Message.Author.Mention + ", you rolled " + number);
}
[Command("dice"), Summary("Roll a number between 1 and 100.")]
public async Task DiceCommand()
{
var rnd = new Random();
var number = rnd.Next(1, 6);
await ReplyAsync(Context.Message.Author.Mention + ", you rolled " + number);
}
}
}