mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
a lot of thingssss
This commit is contained in:
parent
eb0ba140f3
commit
726861294b
14 changed files with 420 additions and 24 deletions
28
commands/message/dev/debug/attachment.js
Normal file
28
commands/message/dev/debug/attachment.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
const { getRecentImage } = require("../../../../labscore/utils/attachment");
|
||||
const { createEmbed } = require("../../../../labscore/utils/embed");
|
||||
const { editOrReply } = require("../../../../labscore/utils/message");
|
||||
|
||||
module.exports = {
|
||||
name: 'attachment',
|
||||
metadata: {
|
||||
description: 'test',
|
||||
examples: ['attachment'],
|
||||
category: 'dev',
|
||||
usage: 'attachment'
|
||||
},
|
||||
run: async (context) => {
|
||||
try{
|
||||
|
||||
let image = await getRecentImage(context, 50)
|
||||
console.log(image)
|
||||
if(!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
|
||||
return editOrReply(context, { embeds: [createEmbed("default", context, {
|
||||
image: {
|
||||
url: image
|
||||
}
|
||||
})] })
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue