mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
add wp
This commit is contained in:
parent
a8aa4f5470
commit
006d7581ad
3 changed files with 13 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
const { wallpaper } = require("#obelisk");
|
||||
const { GenerativeImagesModelsWallpaper } = require("#obelisk");
|
||||
|
||||
const { createEmbed } = require("#utils/embed");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
|
@ -17,19 +17,18 @@ module.exports = {
|
|||
description_short: 'Create Wallpapers',
|
||||
examples: ['wallpaper a painting of northern lights, in the bauhaus style -format square'],
|
||||
category: 'broken',
|
||||
usage: 'wallpaper <prompt> [-format <square|wide>]'
|
||||
usage: 'wallpaper <prompt> [-format <square|landscape>]'
|
||||
},
|
||||
args: [
|
||||
{ name: 'format', default: 'wide', required: false, help: "Image style (wide, square)." }
|
||||
{ name: 'format', default: 'landscape', required: false, help: "Image style (landscape, square)." }
|
||||
],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline, ...PERMISSION_GROUPS.attachments],
|
||||
run: async (context, args) => {
|
||||
return;
|
||||
if(!await hasFeature(context, "ai/wallpapers")) return;
|
||||
if(!await hasFeature(context, "ai/imagen")) return;
|
||||
await acknowledge(context);
|
||||
|
||||
if(!args.text) return editOrReply(context, createEmbed("warning", context, `Missing Parameter (prompt).`))
|
||||
if(!["wide","square"].includes(args.format.toLowerCase())) return editOrReply(context, createEmbed("warning", context, `Invalid Parameter (format).`))
|
||||
|
||||
try{
|
||||
let load = createEmbed("defaultNoFooter", context, {
|
||||
url: "https://bignutty.gitlab.io",
|
||||
|
@ -45,7 +44,7 @@ module.exports = {
|
|||
|
||||
await editOrReply(context, {embeds: loadingEmbeds});
|
||||
|
||||
let res = await wallpaper(context, args.text, args.format.toLowerCase());
|
||||
let res = await GenerativeImagesModelsWallpaper(context, args.text, args.format.toUpperCase());
|
||||
|
||||
// Construct Embeds
|
||||
let files = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue