Files
LaDOSE/LaDOSE.Src/LaDOSE.DiscordBot/Command/Shutdown.cs

25 lines
553 B
C#
Raw Normal View History

2018-10-04 00:29:25 +02:00
using System.Threading.Tasks;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
namespace LaDOSE.DiscordBot.Command
{
[RequireRolesAttribute("SuperAdmin")]
2019-02-20 21:54:21 +01:00
public class Shutdown
2018-10-04 00:29:25 +02:00
{
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();
}
}
}