Discord bot don't send ai image (Cf workers + discord http integration)
In addition, I created code to create slash commands, because the one from github does not create commands:
I don't know what I did wrong
I don't know what I did wrong
const { Client } = require('discord.js');
const client = new Client({ intents: (131071) });
client.once('ready', async () => {
console.log('Bot is ready!');
const data = {
name: 'imagine',
description: 'Generate ai image',
type: 1,
options: [{
name: 'prompt',
type: 3,
description: 'Prompt of your ai image',
required: true,
}],
};
await client.application.commands.create(data);
});
client.login('token');