diff --git a/src/commands/nucleus/stats.ts b/src/commands/nucleus/stats.ts index d6577e7..d410da8 100644 --- a/src/commands/nucleus/stats.ts +++ b/src/commands/nucleus/stats.ts @@ -46,7 +46,7 @@ const confirm = async (interaction: ButtonInteraction) => { .setStyle(TextInputStyle.Short) .setLabel(`Type "${chosen}" below`) .setCustomId("confirm") - .setPlaceholder("Guild ID") + .setPlaceholder("1234567890") .setMinLength(chosen.length) .setMaxLength(chosen.length) ) diff --git a/src/commands/settings/automod.ts b/src/commands/settings/automod.ts index 471af80..0d9188a 100644 --- a/src/commands/settings/automod.ts +++ b/src/commands/settings/automod.ts @@ -186,6 +186,8 @@ const imageMenu = async ( const embed = new EmojiEmbed() .setTitle("Image Settings") + .setStatus("Success") + // .setEmoji("") // TODO .setDescription( `${emojiFromBoolean(current.NSFW)} **NSFW**\n` + `${emojiFromBoolean(current.size)} **Size**\n` ) @@ -657,7 +659,7 @@ const mentionMenu = async ( const allowedMenu = new ActionRowBuilder().addComponents( new StringSelectMenuBuilder() .setCustomId("allowed") - .setPlaceholder("Edit exceptions") + .setPlaceholder("Edit allowed list") .addOptions( new StringSelectMenuOptionBuilder() .setLabel("Users") @@ -689,30 +691,29 @@ const mentionMenu = async ( : "") + "\n" + `Except if...\n` + - `> ${ - current.allowed.users.length > 0 - ? `Member is: ${listToAndMore( - current.allowed.users.map((u) => `<@${u}>`), - 3 - )}\n` - : "" - }` + - `> ${ - current.allowed.roles.length > 0 - ? `Member has role: ${listToAndMore( - current.allowed.roles.map((r) => `<@&${r}>`), - 3 - )}\n` - : "" - }` + - `> ${ - current.allowed.channels.length > 0 - ? `In channel: ${listToAndMore( - current.allowed.channels.map((c) => `<#${c}>`), - 3 - )}\n` - : "" - }` + (current.allowed.users.length > 0 + ? `> Member is: ${listToAndMore( + current.allowed.users.map((u) => `<@${u}>`), + 3 + )}\n` + : "") + + (current.allowed.roles.length > 0 + ? `> Member has role: ${listToAndMore( + current.allowed.roles.map((r) => `<@&${r}>`), + 3 + )}\n` + : "") + + (current.allowed.channels.length > 0 + ? `> In channel: ${listToAndMore( + current.allowed.channels.map((c) => `<#${c}>`), + 3 + )}\n` + : "") + + (current.allowed.users.length == 0 || + current.allowed.roles.length == 0 || + current.allowed.channels.length == 0 + ? "> *Nobody on allowed lists*\n" + : "") ) .setStatus("Success") .setEmoji("GUILD.SETTINGS.GREEN") diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts index 62abd7e..62fb248 100644 --- a/src/commands/settings/logs/attachment.ts +++ b/src/commands/settings/logs/attachment.ts @@ -38,7 +38,7 @@ const callback = async (interaction: CommandInteraction): Promise => { }); let data = await client.database.guilds.read(interaction.guild!.id); - let channel = data.logging.staff.channel; + let channel = data.logging.attachments.channel; let closed = false; do { @@ -60,7 +60,7 @@ const callback = async (interaction: CommandInteraction): Promise => { .setLabel("Save") .setStyle(ButtonStyle.Success) .setEmoji(getEmojiByName("ICONS.SAVE", "id") as Discord.APIMessageComponentEmoji) - .setDisabled(channel === data.logging.staff.channel) + .setDisabled(channel === data.logging.attachments.channel) ); const embed = new EmojiEmbed() diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts index 56f1444..ebcb257 100644 --- a/src/utils/getEmojiByName.ts +++ b/src/utils/getEmojiByName.ts @@ -18,7 +18,7 @@ function getEmojiPaths(obj: EmojisIndex, path: string[] = []) { } getEmojiPaths(emojis); -function getEmojiByName(name: typeof EMOJIPATHS[number], format?: string): string { +function getEmojiByName(name: (typeof EMOJIPATHS)[number], format?: string): string { const parts = name.split("."); let id: string | EmojisIndex | EmojisIndex[] | undefined = emojis; for (const part of parts) {