penguin-band/index.js
2023-11-24 18:35:58 -06:00

18 lines
471 B
JavaScript

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);