feat: new /a command

This commit is contained in:
2022-08-24 12:10:41 +02:00
parent d53ef1f731
commit e16bd026a2
9 changed files with 15 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
const { commandModule, CommandType } = require('@sern/handler');
import { publish } from "../../src/plugins/publish";
const attachment1 = 'A.png';
export default commandModule({
name: 'a',
@@ -8,7 +7,20 @@ export default commandModule({
plugins: [publish({ guildIds: ['1000400148289036298', '928018226330337280'] })],
description: 'A',
//alias : [],
execute: async (ctx, args) => {
await ctx.reply({content: 'A', files: [attachment1]});
execute: async (ctx, options) => {
const imagesArray = [
'./images/XaviXE.png',
// 'images/Paula.png',
'./images/William.png',
'./images/Espejito2500.png',
'./images/Paula.png',
'./images/Wheelook.png',
'./images/MarioCabrera.png',
'./images/Paticama.png',
'./images/Vinci.png'
]
const images = imagesArray[Math.floor(Math.random() * imagesArray.length)];
await ctx.reply({content: 'A', files: [images]});
},
});

BIN
images/Espejito2500.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
images/MarioCabrera.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
images/Paticama.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
images/Vinci.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
images/Wheelook.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/William.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB