Geekbot logo and roll command
This commit is contained in:
parent
b16bec8517
commit
315526c32b
3 changed files with 36 additions and 12 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
25
Geekbot.net/Modules/Roll.cs
Normal file
25
Geekbot.net/Modules/Roll.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue