This commit is contained in:
grngxd 2025-07-31 12:03:55 +01:00
parent 77101f1cc2
commit 67d53818f3

View file

@ -1,9 +1,16 @@
import { Client, Events, GatewayIntentBits } from 'discord.js'; import { Client, Events, GatewayIntentBits } from 'discord.js';
const client = new Client({ intents: [GatewayIntentBits.Guilds] }); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
client.once(Events.ClientReady, (c) => { client.once(Events.ClientReady, (c) => {
console.log(`Ready! Logged in as ${c.user.tag}`); console.log(c.user.tag);
});
client.on(Events.MessageCreate, async (message) => {
if (message.author.bot) return;
if (client.user && message.mentions.has(client.user)) {
await message.reply(`hi ${message.author}\n-# TODO: make this show user info`);
}
}); });
client.login(process.env.TOKEN).catch((err) => { client.login(process.env.TOKEN).catch((err) => {