import { Client, Events, GatewayIntentBits } from 'npm:discord.js@14';
const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ]});
client.once(Events.ClientReady, async (bot) => {
console.log(`Ready! Logged in as ${bot.user.tag}`);
});
client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply({ content: 'Pong!' });
};
});
client.login("insert token here");
import { Client, Events, GatewayIntentBits } from 'npm:discord.js@14';
const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ]});
client.once(Events.ClientReady, async (bot) => {
console.log(`Ready! Logged in as ${bot.user.tag}`);
});
client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply({ content: 'Pong!' });
};
});
client.login("insert token here");