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

36 lines
965 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
{
public partial class Twitch
{
internal class Result
{
Dependencies dep;
public Result(Dependencies d)
{
this.dep = d;
}
2018-10-04 20:53:36 +02:00
[RequireRolesAttribute("Staff")]
[Command("update")]
public async Task UpdateAsync(CommandContext ctx)
2018-10-04 00:29:25 +02:00
{
2018-10-04 20:53:36 +02:00
var tournament = await dep.ChallongeService.GetLastTournament();
await ctx.RespondAsync($"Mise à jour effectuée");
2018-10-04 00:29:25 +02:00
}
2018-10-04 01:32:33 +02:00
[Command("last")]
public async Task LastAsync(CommandContext ctx)
{
2018-10-04 20:53:36 +02:00
var lastTournamentMessage = dep.ChallongeService.GetLastTournamentMessage();
await ctx.RespondAsync(lastTournamentMessage);
2018-10-04 01:32:33 +02:00
}
2018-10-04 00:29:25 +02:00
}
}
}