Files
Emmelia-Link-Flayer-Rewrite/commands/stability.js
Logan Cusano e874e3c785 Initial implementation of Stable Diffusion
- Needs to add attachment to discord
- Needs to delete image afterward
- Needs to calculate token usage
2023-03-13 00:03:59 -04:00

33 lines
1016 B
JavaScript

const { SlashCommandBuilder } = require('discord.js');
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "stability");
const { submitImageGenerationTransaction, STABILITY_COLOR } = require("../controllers/stabilityController");
const { EmmeliaEmbedBuilder } = require('../libUtils');
module.exports = {
data: new SlashCommandBuilder()
.setName('stability')
.setDescription('Replies with your input!'),
/*
.addStringOption(option =>
option.setName('input')
.setDescription('The input to echo back')
.setRequired(false)
.addChoices()),
*/
example: "stability",
isPrivileged: true,
requiresTokens: false,
defaultTokenUsage: 0,
deferInitialReply: true,
async execute(interaction) {
try{
await submitImageGenerationTransaction();
await interaction.editReply('**Pong.**'); // TODO - Add insults as the response to this command
}catch(err){
log.ERROR(err)
//await interaction.reply(err.toString());
}
}
};