Add dice system
This commit is contained in:
parent
771f7ab4c2
commit
513fe1948e
@ -6,6 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DiceRoller" Version="4.1.0" />
|
||||
<PackageReference Include="Discord.Net" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.0.0" />
|
||||
|
||||
16
ChaosBot/Discord/Modules/DiceCommands.cs
Normal file
16
ChaosBot/Discord/Modules/DiceCommands.cs
Normal file
@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user