Refactor self-role management to use a role builder interface
- Replaced the text area for role input with a structured role builder, enhancing user experience and reducing input errors. - Updated the self-role management logic to handle roles as structured objects instead of plain text, improving data integrity. - Introduced new functions for parsing and validating roles, ensuring compliance with the new builder format. - Enhanced error handling for role creation and updates, providing clearer feedback for missing or invalid data. - Updated localization files to reflect changes in role management terminology and instructions.
This commit is contained in:
@@ -845,6 +845,14 @@ export const DiscordRoleOptionSchema = z.object({
|
||||
});
|
||||
export type DiscordRoleOption = z.infer<typeof DiscordRoleOptionSchema>;
|
||||
|
||||
export const DiscordEmojiOptionSchema = z.object({
|
||||
id: SnowflakeSchema,
|
||||
name: z.string(),
|
||||
animated: z.boolean(),
|
||||
url: z.string().url()
|
||||
});
|
||||
export type DiscordEmojiOption = z.infer<typeof DiscordEmojiOptionSchema>;
|
||||
|
||||
/**
|
||||
* Known slash command names, aggregated from every module's
|
||||
* `command-definitions.ts` (`SlashCommandBuilder#setName`). Used by the
|
||||
|
||||
Reference in New Issue
Block a user