require('dotenv').config(); const { Client, GatewayIntentBits } = require('discord.js'); const token = process.env.TOKEN; const client = new Client({ intents: [GatewayIntentBits.Guilds] }) client.once('ready', () => { console.log('Bot is Ready!'); }); client.on('interactionCreate', async interaction => { if (!interaction.isCommand()) return; console.log(interaction.commandName); let commandName = interaction.commandName; if (commandName === "generate") { if (interaction.options.getSubcommand() === "host") { let rating = interaction.options.getNumber("rating"); let type = interaction.options.getString("type") ?? "foundation"; await interaction.reply({files: ["./france-in-pictures-beautiful-places-to-photograph-eiffel-tower.jpg"]}); } } }) client.login(token);