imgbot
Kieran 2022-07-25 17:50:31 +01:00
parent 26e95f0799
commit a58a00c793
1 changed files with 0 additions and 31 deletions

View File

@ -1,31 +0,0 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { SlashCommandBuilder } = require('@discordjs/builders');
const { Dalle } = require('dalle-node')
module.exports = {
...new SlashCommandBuilder()
.setName('AI')
.setDescription('Use the Dalle generator to make an AI generated image')
.addStringOption((option) => option
.setName('prompt')
.setDescription("Your prompt")
.setRequired(true)
),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const dalle = new Dalle(process.env.DALLE_TOKEN); // Bearer Token
const promptToUse = interaction.options.getString('prompt')
const generations = await dalle.generate(promptToUse);
interaction.reply({files: [generations]})
},
};