using Discord.Commands; using Discord.WebSocket; using Sean.Services; using System.Threading.Tasks; namespace Sean.Modules { public class AwardsModule : ModuleBase { #region Properties public AwardsPersistencyService persistencyService { get; set; } #endregion Properties #region Methods [Command("blame")] [Summary("Blames the user and removes him one point")] [Alias("bash")] public async Task BlameUserAsync([Summary("The user to blame")] SocketUser user) { var userInfo = user; int score = persistencyService.RemovePoint(user); await ReplyAsync($"Nice job {userInfo.Username}#{userInfo.Discriminator}, your score is now {score}"); } [Command("board")] [Summary("Give the leader board")] [Alias("top")] public async Task BoardAsync() { await ReplyAsync(persistencyService.LeaderBoard()); } [Command("great")] [Summary("Greats the user and give him one point")] [Alias("reward")] public async Task GreatUserAsync([Summary("The user to great")] SocketUser user) { var userInfo = user; int score = persistencyService.AddPoint(user); await ReplyAsync($"{userInfo.Username}#{userInfo.Discriminator} have now a score of {score}"); } #endregion Methods } }