mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
changes to categories
This commit is contained in:
parent
f0af222fa5
commit
09cd1a7fa4
4 changed files with 3 additions and 41 deletions
|
@ -1,38 +0,0 @@
|
|||
const { getRecentImage } = require("../../../../labscore/utils/attachment");
|
||||
const { createEmbed } = require("../../../../labscore/utils/embed");
|
||||
const { editOrReply } = require("../../../../labscore/utils/message");
|
||||
|
||||
const { deepdream } = require('../../../../labscore/api')
|
||||
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'deepdream',
|
||||
aliases: ['dd'],
|
||||
metadata: {
|
||||
description: 'Processes an image with DeepAI DeepDream.',
|
||||
description_short: 'DeepDream image processing',
|
||||
category: 'hidden',
|
||||
usage: 'deepdream <image>'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||
run: async (context) => {
|
||||
context.triggerTyping();
|
||||
try{
|
||||
let image = await getRecentImage(context, 50)
|
||||
if(!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
|
||||
|
||||
let res = await deepdream(context, image)
|
||||
|
||||
if(res.response.body.status == 1) return editOrReply(context, {embeds:[createEmbed("warning", context, res.response.body.errors[0])]})
|
||||
|
||||
return editOrReply(context, createEmbed("image", context, {
|
||||
url: res.response.body.image,
|
||||
time: res.timings
|
||||
}))
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return editOrReply(context, {embeds:[createEmbed("error", context, `Deepdream timed out.`)]})
|
||||
}
|
||||
},
|
||||
};
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
metadata: {
|
||||
description: 'Upscales an image with SuperResolution.',
|
||||
description_short: 'SuperResolution upscaling',
|
||||
category: 'hidden',
|
||||
category: 'image',
|
||||
usage: 'superresolution <image>'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
metadata: {
|
||||
description: 'Processes an image with Waifu2x.',
|
||||
description_short: 'Waifu2x upscaling',
|
||||
category: 'hidden',
|
||||
category: 'image',
|
||||
usage: 'waifu2x <image>'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
description: 'Edits an image using AI.',
|
||||
description_short: 'AI image editing',
|
||||
examples: ['editimage Wearing a crown'],
|
||||
category: 'hidden',
|
||||
category: 'image',
|
||||
usage: 'editimage <prompt>'
|
||||
},
|
||||
ratelimit: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue