24 lines
No EOL
549 B
JavaScript
24 lines
No EOL
549 B
JavaScript
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;
|
|
|
|
let commandName = interaction.commandName;
|
|
|
|
if (commandName === "generate") {
|
|
await interaction.reply(`Generating ${interaction.options.getString('type')}`);
|
|
}
|
|
})
|
|
|
|
client.login(token); |