public async Task UnExileAsync(ulong user) { if (Operators.ContainsKey(Context.Message.Author.Id)) { try { if (Blacklist.ContainsKey(Context.Client.GetUser(user).Id)) { Blacklist.Remove(Context.Client.GetUser(user).Id); } } catch { } await Config.Save(); await ReplyAsync("Removed users from blacklist, they may receive tips again."); try { RainBorg.Log(2, "Command", "{0} was removed from the blacklist by {1}", user, Context.User.Username); IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact); await Context.Message.AddReactionAsync(emote); } catch { await Context.Message.AddReactionAsync(new Emoji("👌")); } } }
public async Task ExileAsync(ulong user, [Remainder] string Remainder = "") { if (Operators.ContainsKey(Context.Message.Author.Id)) { try { if (!Blacklist.ContainsKey(Context.Client.GetUser(user).Id)) { Blacklist.Add(Context.Client.GetUser(user).Id, Remainder); await RainBorg.RemoveUserAsync(Context.Client.GetUser(user), 0); } } catch { } await Config.Save(); await ReplyAsync("Blacklisted users, they will receive no tips."); try { RainBorg.Log(2, "Command", "{0} was blacklisted by {1} with reason being: {2}", user, Context.User.Username, Remainder); IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact); await Context.Message.AddReactionAsync(emote); } catch { await Context.Message.AddReactionAsync(new Emoji("👌")); } } }