import { Client, GatewayIntentBits } from "discord.js"; const { token } = require("./config.json"); const client = new Client({ intents: [GatewayIntentBits.Guilds] }); client.on("ready", () => { console.log(`Logged in as ${client.user.tag}!`); }); client.on("interactionCreate", async (interaction) => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName === "hello") { await interaction.reply("world"); } }); client.login(token);