Files
LaDOSE/LaDOSE.Src/LaDOSE.DiscordBot/Command/Shutdown.cs
2018-10-04 21:18:18 +02:00

26 lines
561 B
C#

using System.Threading.Tasks;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
namespace LaDOSE.DiscordBot.Command
{
[RequireRolesAttribute("SuperAdmin")]
internal class Shutdown
{
private readonly Dependencies dep;
public Shutdown(Dependencies d)
{
dep = d;
}
[Command("shutdown")]
public async Task ShutDownAsync(CommandContext ctx)
{
await ctx.RespondAsync("Hasta la vista, baby");
dep.Cts.Cancel();
}
}
}