Directories
This commit is contained in:
36
LaDOSE.Src/LaDOSE.DiscordBot/Command/Result.cs
Normal file
36
LaDOSE.Src/LaDOSE.DiscordBot/Command/Result.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Threading.Tasks;
|
||||
using DSharpPlus.CommandsNext;
|
||||
using DSharpPlus.CommandsNext.Attributes;
|
||||
|
||||
namespace LaDOSE.DiscordBot.Command
|
||||
{
|
||||
public partial class Twitch
|
||||
{
|
||||
internal class Result
|
||||
{
|
||||
Dependencies dep;
|
||||
public Result(Dependencies d)
|
||||
{
|
||||
this.dep = d;
|
||||
}
|
||||
|
||||
|
||||
[RequireRolesAttribute("Staff")]
|
||||
[Command("update")]
|
||||
public async Task UpdateAsync(CommandContext ctx)
|
||||
{
|
||||
var tournament = await dep.ChallongeService.GetLastTournament();
|
||||
await ctx.RespondAsync($"Mise à jour effectuée");
|
||||
|
||||
}
|
||||
|
||||
[Command("last")]
|
||||
public async Task LastAsync(CommandContext ctx)
|
||||
{
|
||||
var lastTournamentMessage = dep.ChallongeService.GetLastTournamentMessage();
|
||||
await ctx.RespondAsync(lastTournamentMessage);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
26
LaDOSE.Src/LaDOSE.DiscordBot/Command/Twitch.cs
Normal file
26
LaDOSE.Src/LaDOSE.DiscordBot/Command/Twitch.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using DSharpPlus.CommandsNext;
|
||||
using DSharpPlus.CommandsNext.Attributes;
|
||||
|
||||
namespace LaDOSE.DiscordBot.Command
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
|
||||
internal class Twitch
|
||||
{
|
||||
Dependencies dep;
|
||||
public Twitch(Dependencies d)
|
||||
{
|
||||
this.dep = d;
|
||||
}
|
||||
|
||||
[Command("twitch")]
|
||||
public async Task TwitchAsync(CommandContext ctx)
|
||||
{
|
||||
await ctx.RespondAsync("https://www.twitch.tv/LaDOSETV");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user