mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
rename wallpapers
This commit is contained in:
parent
b3d7e2540d
commit
12556f2c7a
1 changed files with 6 additions and 11 deletions
|
@ -11,19 +11,16 @@ const { iconPill, stringwrap } = require("../../../labscore/utils/markdown");
|
|||
const { hasFeature } = require("../../../labscore/utils/testing");
|
||||
|
||||
module.exports = {
|
||||
name: 'wallpaper',
|
||||
name: 'imagen',
|
||||
label: 'text',
|
||||
aliases: ['aiwp'],
|
||||
aliases: ['aiimg'],
|
||||
metadata: {
|
||||
description: `${iconPill("generative_ai", "LIMITED TESTING")}\n\nCreate Wallpapers`,
|
||||
description: `${iconPill("generative_ai", "LIMITED TESTING")}\n\nGenerate images with Imagen 2`,
|
||||
description_short: 'Create Wallpapers',
|
||||
examples: ['aiwp northern lights'],
|
||||
examples: ['imagen a painting of northern lights'],
|
||||
category: 'limited',
|
||||
usage: 'aiwallpaper <prompt>'
|
||||
usage: 'imagen <prompt>'
|
||||
},
|
||||
args: [
|
||||
{ name: 'style', default: 'translucent', required: false, help: "Image Style." },
|
||||
],
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||
run: async (context, args) => {
|
||||
if(!await hasFeature(context, "ai/wallpapers")) return;
|
||||
|
@ -31,8 +28,6 @@ module.exports = {
|
|||
|
||||
if(!args.text) return editOrReply(context, createEmbed("warning", context, `Missing Parameter (prompt).`))
|
||||
|
||||
let input = args.text;
|
||||
|
||||
try{
|
||||
await editOrReply(context, createEmbed("defaultNoFooter", context, {
|
||||
author: {
|
||||
|
@ -46,7 +41,7 @@ module.exports = {
|
|||
// Construct Embeds
|
||||
let files = [];
|
||||
let embeds = res.response.body.images.map((i)=>{
|
||||
let imgName = `lcwp.${(Date.now() + Math.random()).toString(36)}.jpeg`;
|
||||
let imgName = `lcigen.${(Date.now() + Math.random()).toString(36)}.jpeg`;
|
||||
|
||||
files.push({
|
||||
filename: imgName,
|
Loading…
Add table
Add a link
Reference in a new issue