prettiered
diff --git a/src/commands/settings/rolemenu.ts b/src/commands/settings/rolemenu.ts
index 333dbdc..1ca10a4 100644
--- a/src/commands/settings/rolemenu.ts
+++ b/src/commands/settings/rolemenu.ts
@@ -111,7 +111,7 @@
m: Message,
data: { name?: string; description?: string; bounds?: { min: number; max: number } },
addBounds: boolean = false
-): Promise<[string | undefined, string | undefined, { min: number, max: number } | undefined]> => {
+): Promise<[string | undefined, string | undefined, { min: number; max: number } | undefined]> => {
let { name, description, bounds } = data;
const components = [
new ActionRowBuilder<TextInputBuilder>().addComponents(
@@ -134,7 +134,7 @@
.setRequired(false)
.setMaxLength(100)
)
- ]
+ ];
if (addBounds && bounds) {
components.push(
new ActionRowBuilder<TextInputBuilder>().addComponents(
@@ -157,14 +157,12 @@
.setRequired(true)
.setMaxLength(2)
)
- )
+ );
}
const modal = new ModalBuilder()
.setTitle("Edit Name and Description")
.setCustomId("editNameDescription")
- .addComponents(
- ...components
- );
+ .addComponents(...components);
const button = new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder()
.setCustomId("back")
@@ -241,18 +239,20 @@
const noRoles = data.options.length === 0;
const previewSelect = configToDropdown(
"Edit Roles",
- data.description ? {
- name: data.name,
- description: data.description,
- min: 1,
- max: 1,
- options: noRoles ? [{ name: "Role 1", description: null, role: "No role set" }] : data.options
- } : {
- name: data.name,
- min: 1,
- max: 1,
- options: noRoles ? [{ name: "Role 1", description: null, role: "No role set" }] : data.options
- },
+ data.description
+ ? {
+ name: data.name,
+ description: data.description,
+ min: 1,
+ max: 1,
+ options: noRoles ? [{ name: "Role 1", description: null, role: "No role set" }] : data.options
+ }
+ : {
+ name: data.name,
+ min: 1,
+ max: 1,
+ options: noRoles ? [{ name: "Role 1", description: null, role: "No role set" }] : data.options
+ },
undefined,
noRoles
);
@@ -301,7 +301,7 @@
case "edit": {
const [name, description, _bounds] = await editNameDescription(i, interaction, m, data);
data.name = name ? name : data.name;
- description ? data.description = description : null;
+ description ? (data.description = description) : null;
break;
}
case "addRole": {
@@ -523,7 +523,9 @@
? currentObject.options
.map((key: ObjectSchema) => {
const crossOut = key.enabled ? "" : "~~";
- return `> ${crossOut}**${key.name}:** ${key.description ?? "*No description set*"}${crossOut}`;
+ return `> ${crossOut}**${key.name}:** ${
+ key.description ?? "*No description set*"
+ }${crossOut}`;
})
.join("\n")
: "")
@@ -566,12 +568,17 @@
"id"
) as APIMessageComponentEmoji
)
- )
+ );
embed.setDescription(
`**Currently Editing:** ${current.name}\n\n` +
`**Visible:** ${current.enabled ? `${tick} Yes` : `${cross} No`}\n\n` +
`**Description:**\n> ${current.description ?? "*No description set*"}\n` +
- `\n\n${createPageIndicator(Object.keys(currentObject.options).length, page - 1, false, Object.values(currentObject.options).map((o) => !(o.enabled ?? true)))}`
+ `\n\n${createPageIndicator(
+ Object.keys(currentObject.options).length,
+ page - 1,
+ false,
+ Object.values(currentObject.options).map((o) => !(o.enabled ?? true))
+ )}`
);
pageSelect.addOptions(
@@ -649,7 +656,7 @@
}
case "save": {
await client.database.guilds.write(interaction.guild.id, {
- "roleMenu": currentObject
+ roleMenu: currentObject
});
modified = false;
await client.memory.forceUpdate(interaction.guild.id);