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:
33
commands/stability.js
Normal file
33
commands/stability.js
Normal 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());
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user