Directories
This commit is contained in:
26
LaDOSE.Src/LaDOSE.DiscordBot/Command/Shutdown.cs
Normal file
26
LaDOSE.Src/LaDOSE.DiscordBot/Command/Shutdown.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user