Goal: React when the bot starts and when messages are sent.
Open events/. You’ll see files like ready, messageCreate, interactionCreate.
Open the ready event file and add a log like:
console.log("Bot is ready!");
Open events/messageCreate.js (or equivalent) and add:
if (message.author.bot) return;
if (message.content === "hi bot") {
await message.reply("Hello!");
}
node index.js
In Discord, type: hi bot