public async Task UserProfileInfo([Remainder] string users = null) { SocketUser target = null; var mentionedUser = Context.Message.MentionedUsers.FirstOrDefault(); target = mentionedUser ?? Context.User; var marriages = UserProfiles.GetMarriages(target); var xp = UserProfiles.GetXP(target); var level = UserProfiles.GetLevel(target); var currency = UserProfiles.GetCurrency(target); var id = UserProfiles.GetId(target); var joinAt = Context.Guild.CurrentUser.JoinedAt; var userPf = UserProfiles.GetAccount(target); // Set username in profile for updated username userPf.Username = target.Username; UserProfiles.SaveProfiles(); var embed = new EmbedBuilder() .WithColor(255, 73, 167) .WithThumbnailUrl(target.GetAvatarUrl()) .WithAuthor($"{target.Username}'s Global Profile") .AddField("Level & EXP", level + " [" + level + "/" + xp + "]", true) .AddField("Nico Nii's", $"{currency} <:niconii:451873490883313664>", true) .AddField("ID", id) .AddField("Marriages <:nicolove:451873491130646528>", marriages, true) .WithFooter(footer => { footer .WithText($"Server Member since {joinAt}"); }); await Context.Channel.SendMessageAsync("", embed : embed.Build()); }
public async Task ConfirmMarriageSlot() { var userPf = UserProfiles.GetAccount(Context.User); // You var marriageCount = UserProfiles.GetMarriageCount(Context.User); var currency = UserProfiles.GetCurrency(Context.User); if (userPf.IsBuyingSlot) { if (marriageCount == 5) { if (currency >= 1000) { UserProfiles.BuyMarriageSlot(Context.User, 1000); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } if (marriageCount == 6) { if (currency >= 1500) { UserProfiles.BuyMarriageSlot(Context.User, 1500); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } if (marriageCount == 7) { if (currency >= 2000) { UserProfiles.BuyMarriageSlot(Context.User, 2000); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } if (marriageCount == 8) { if (currency >= 2500) { UserProfiles.BuyMarriageSlot(Context.User, 2500); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } if (marriageCount == 9) { if (currency >= 3000) { UserProfiles.BuyMarriageSlot(Context.User, 3000); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } if (marriageCount == 10) { if (currency >= 3500) { UserProfiles.BuyMarriageSlot(Context.User, 3500); await ReplyAsync($"You purchased one slot!"); } else { await ReplyAsync($"You do not have enough Nico Nii's to buy a slot."); } } UserProfiles.SaveProfiles(); } }