fix: /a main command and wheelook new pfp

This commit is contained in:
2022-10-07 23:23:00 +02:00
parent df3ba77068
commit ab71fd3ee0
3 changed files with 1459 additions and 2342 deletions

View File

@@ -29,21 +29,6 @@ export default commandModule({
}
],
execute: async (ctx, options) => {
try {
if (choices.indexOf(options[1].getString('usuario', true)) > -1) {
const attachmentbuilder = new AttachmentBuilder(`./images/${options[1].getString('usuario', true)}.png`)
const embed = new EmbedBuilder()
.setTitle("A")
.setImage(`attachment://${options[1].getString('usuario', true)}.png`)
.setColor("Random")
await ctx.reply({embeds: [embed], files: [attachmentbuilder]})
} else {
const embed = new EmbedBuilder()
.setTitle("A no encontrado!")
.setDescription(`Qué raro, no se ha encontrado ese /a...\nPorqué no pruebas a poner uno del autocompletado?`)
.setColor("Red")
await ctx.reply({embeds: [embed], ephemeral: true})
}
if (!options[1].getString('usuario', true)) {
const imagesArray = [
'./images/XaviXE.png',
@@ -61,7 +46,21 @@ export default commandModule({
const images = imagesArray[Math.floor(Math.random() * imagesArray.length)];
await ctx.reply({content: 'A', files: [images]});
} else {
if (choices.indexOf(options[1].getString('usuario', true)) > -1) {
const attachmentbuilder = new AttachmentBuilder(`./images/${options[1].getString('usuario', true)}.png`)
const embed = new EmbedBuilder()
.setTitle("A")
.setImage(`attachment://${options[1].getString('usuario', true)}.png`)
.setColor("Random")
await ctx.reply({embeds: [embed], files: [attachmentbuilder]})
} else {
const embed = new EmbedBuilder()
.setTitle("A no encontrado!")
.setDescription(`Qué raro, no se ha encontrado ese /a...\nPorqué no pruebas a poner uno del autocompletado?`)
.setColor("Red")
await ctx.reply({embeds: [embed], ephemeral: true})
}
}
} catch (err) {}
},
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

3770
package-lock.json generated

File diff suppressed because it is too large Load Diff