Compare commits

...

2 commits

Author SHA1 Message Date
Caraxi
6071598b59 Update MareWizardModule.Vanity.cs 2025-08-23 19:13:40 +09:30
Caraxi
0774cb22b3 Update MareWizardModule.cs 2025-08-23 14:00:17 +09:30
2 changed files with 5 additions and 5 deletions

View file

@ -93,12 +93,12 @@ public partial class MareWizardModule
using var db = await GetDbContext().ConfigureAwait(false);
bool canAddVanityId = !db.Users.Any(u => u.UID == modal.DesiredVanityUID || u.Alias == modal.DesiredVanityUID);
Regex rgx = new(@"^[_\-a-zA-Z0-9]{5,15}$", RegexOptions.ECMAScript);
Regex rgx = new(@"^[_\-a-zA-Z0-9]{2,15}$", RegexOptions.ECMAScript);
if (!rgx.Match(desiredVanityUid).Success)
{
eb.WithColor(Color.Red);
eb.WithTitle("Invalid Vanity UID");
eb.WithDescription("A Vanity UID must be between 5 and 15 characters long and only contain the letters A-Z, numbers 0-9, dashes (-) and underscores (_).");
eb.WithDescription("A Vanity UID must be between 2 and 15 characters long and only contain the letters A-Z, numbers 0-9, dashes (-) and underscores (_).");
cb.WithButton("Cancel", "wizard-vanity", ButtonStyle.Secondary, emote: new Emoji("❌"));
cb.WithButton("Pick Different UID", "wizard-vanity-uid-set:" + uid, ButtonStyle.Primary, new Emoji("💅"));
}
@ -169,12 +169,12 @@ public partial class MareWizardModule
using var db = await GetDbContext().ConfigureAwait(false);
bool canAddVanityId = !db.Groups.Any(u => u.GID == modal.DesiredVanityGID || u.Alias == modal.DesiredVanityGID);
Regex rgx = new(@"^[_\-a-zA-Z0-9]{5,20}$", RegexOptions.ECMAScript);
Regex rgx = new(@"^[_\-a-zA-Z0-9]{2,20}$", RegexOptions.ECMAScript);
if (!rgx.Match(desiredVanityGid).Success)
{
eb.WithColor(Color.Red);
eb.WithTitle("Invalid Vanity Syncshell ID");
eb.WithDescription("A Vanity Syncshell ID must be between 5 and 20 characters long and only contain the letters A-Z, numbers 0-9, dashes (-) and underscores (_).");
eb.WithDescription("A Vanity Syncshell ID must be between 2 and 20 characters long and only contain the letters A-Z, numbers 0-9, dashes (-) and underscores (_).");
cb.WithButton("Cancel", "wizard-vanity", ButtonStyle.Secondary, emote: new Emoji("❌"));
cb.WithButton("Pick Different ID", "wizard-vanity-gid-set:" + gid, ButtonStyle.Primary, new Emoji("💅"));
}

View file

@ -176,7 +176,7 @@ public partial class MareWizardModule : InteractionModuleBase
{
cb.WithButton("User Info", "wizard-userinfo", ButtonStyle.Secondary, new Emoji(""));
cb.WithButton("Recover", "wizard-recover", ButtonStyle.Secondary, new Emoji("🏥"));
cb.WithButton("Secondary UID", "wizard-secondary", ButtonStyle.Secondary, new Emoji("2⃣"));
// cb.WithButton("Secondary UID", "wizard-secondary", ButtonStyle.Secondary, new Emoji("2⃣"));
cb.WithButton("Vanity IDs", "wizard-vanity", ButtonStyle.Secondary, new Emoji("💅"));
cb.WithButton("Delete", "wizard-delete", ButtonStyle.Danger, new Emoji("⚠️"));
}