public async Task AddTitleAsync([Remainder] string tn = "") { if (string.IsNullOrWhiteSpace(tn)) { TitleEmbed te = new TitleEmbed(Context); await te.Display(); return; } int?select = null; foreach (int id in AchievementManager.NodeMap.Keys) { if (UtilStringComparison.CompareWordScore(tn, AchievementManager.GetTitle(id).Name) >= 0.66) { select = id; break; } } if (select == null) { TitleEmbed te = new TitleEmbed(Context); await te.Display(); return; } if (UserDataManager.HasTitle(BotUtils.GetGUser(Context), select.Value)) { UserDataManager.EquipTitle(BotUtils.GetGUser(Context), select.Value); await ReplyAsync(BotUtils.KamtroText($"The {AchievementManager.GetTitle(select.Value).Name} title has been set!")); } else { await ReplyAsync(BotUtils.KamtroText($"You don't have the {AchievementManager.GetTitle(select.Value).Name} title")); } }
public async Task TitleListAsync([Remainder] string args = "") { TitleEmbed te = new TitleEmbed(Context); await te.Display(); }