add descriptions to roles that can set vanity ids

This commit is contained in:
rootdarkarchon 2024-02-15 21:10:09 +01:00
parent bd128e832f
commit e63f056c38
4 changed files with 39 additions and 18 deletions

View file

@ -17,13 +17,13 @@ public partial class MareWizardModule
StringBuilder sb = new();
var user = await Context.Guild.GetUserAsync(Context.User.Id).ConfigureAwait(false);
bool userIsInVanityRole = _botServices.VanityRoles.Exists(u => user.RoleIds.Contains(u.Id)) || !_botServices.VanityRoles.Any();
bool userIsInVanityRole = _botServices.VanityRoles.Keys.Any(u => user.RoleIds.Contains(u.Id)) || !_botServices.VanityRoles.Any();
if (!userIsInVanityRole)
{
sb.AppendLine("To be able to set Vanity IDs you must have one of the following roles:");
foreach (var role in _botServices.VanityRoles)
{
sb.Append("- ").AppendLine(role.Mention);
sb.Append("- ").Append(role.Key.Mention).Append(" (").Append(role.Value).AppendLine(")");
}
}
else