public async Task OutOutAsync([Remainder] string Remainder = null) { if (!OptedOut.ContainsKey(Context.Message.Author.Id)) { OptedOut.Add(Context.Message.Author.Id); await RainBorg.RemoveUserAsync(Context.Message.Author, 0); await Config.Save(); try { // Add reaction to message IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact); await Context.Message.AddReactionAsync(emote); } catch { await Context.Message.AddReactionAsync(new Emoji("👌")); } await Context.Message.Author.SendMessageAsync("You have opted out from receiving future tips."); } else { await Context.Message.Author.SendMessageAsync("You have already opted out, use $optin to opt back into receiving tips."); } }
public async Task OptInAsync([Remainder] string Remainder = null) { if (OptedOut.ContainsKey(Context.Message.Author.Id)) { OptedOut.Remove(Context.Message.Author.Id); await Config.Save(); try { // Add reaction to message IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact); await Context.Message.AddReactionAsync(emote); } catch { await Context.Message.AddReactionAsync(new Emoji("👌")); } await Context.Message.Author.SendMessageAsync("You have opted back in, and will receive tips once again."); } else { await Context.Message.Author.SendMessageAsync("You have not opted out, you are already able to receive tips."); } }