- Needs to add attachment to discord - Needs to delete image afterward - Needs to calculate token usage
33 lines
1016 B
JavaScript
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());
|
|
}
|
|
}
|
|
}; |