Development (#73)

pull/75/head
PineappleFan 3 years ago committed by GitHub
commit 7caeb64556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
)

@ -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<StringSelectMenuBuilder>().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.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.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.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")

@ -38,7 +38,7 @@ const callback = async (interaction: CommandInteraction): Promise<unknown> => {
});
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<unknown> => {
.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()

@ -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) {

Loading…
Cancel
Save