mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-11 15:43:03 -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");
|
const { hasFeature } = require("../../../labscore/utils/testing");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'wallpaper',
|
name: 'imagen',
|
||||||
label: 'text',
|
label: 'text',
|
||||||
aliases: ['aiwp'],
|
aliases: ['aiimg'],
|
||||||
metadata: {
|
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',
|
description_short: 'Create Wallpapers',
|
||||||
examples: ['aiwp northern lights'],
|
examples: ['imagen a painting of northern lights'],
|
||||||
category: 'limited',
|
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],
|
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||||
run: async (context, args) => {
|
run: async (context, args) => {
|
||||||
if(!await hasFeature(context, "ai/wallpapers")) return;
|
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).`))
|
if(!args.text) return editOrReply(context, createEmbed("warning", context, `Missing Parameter (prompt).`))
|
||||||
|
|
||||||
let input = args.text;
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
await editOrReply(context, createEmbed("defaultNoFooter", context, {
|
await editOrReply(context, createEmbed("defaultNoFooter", context, {
|
||||||
author: {
|
author: {
|
||||||
|
@ -46,7 +41,7 @@ module.exports = {
|
||||||
// Construct Embeds
|
// Construct Embeds
|
||||||
let files = [];
|
let files = [];
|
||||||
let embeds = res.response.body.images.map((i)=>{
|
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({
|
files.push({
|
||||||
filename: imgName,
|
filename: imgName,
|
Loading…
Add table
Add a link
Reference in a new issue