From 513fe1948ed26afdcf2f80a44dc30c22d084d791 Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Wed, 3 Jun 2020 20:34:11 +0200 Subject: [PATCH] Add dice system --- ChaosBot/ChaosBot.csproj | 1 + ChaosBot/Discord/Modules/DiceCommands.cs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 ChaosBot/Discord/Modules/DiceCommands.cs diff --git a/ChaosBot/ChaosBot.csproj b/ChaosBot/ChaosBot.csproj index c24a155..7d74f09 100644 --- a/ChaosBot/ChaosBot.csproj +++ b/ChaosBot/ChaosBot.csproj @@ -6,6 +6,7 @@ + diff --git a/ChaosBot/Discord/Modules/DiceCommands.cs b/ChaosBot/Discord/Modules/DiceCommands.cs new file mode 100644 index 0000000..fbea25d --- /dev/null +++ b/ChaosBot/Discord/Modules/DiceCommands.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; +using Dice; +using Discord.Commands; +using Microsoft.VisualBasic; + +namespace ChaosBot.Discord.Modules +{ + public class DiceCommands : ModuleBase + { + [Command("roll")] + public async Task Roll(params string[] args) + { + await ReplyAsync($"You rolled {Roller.Roll(Strings.Join(args, " ")).Value}"); + } + } +} \ No newline at end of file