Initial implementation of Stable Diffusion

- Needs to add attachment to discord
- Needs to delete image afterward
- Needs to calculate token usage
This commit is contained in:
Logan Cusano
2023-03-13 00:03:59 -04:00
parent 53256cdc42
commit e874e3c785
9 changed files with 13647 additions and 2 deletions

33
commands/stability.js Normal file
View File

@@ -0,0 +1,33 @@
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());
}
}
};