-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
25 lines (19 loc) · 983 Bytes
/
index.js
File metadata and controls
25 lines (19 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ===================================================================
// English: You can delete all these files and upload your project or bot.
// Español: Puede eliminar todos estos archivos y cargar tu propio proyecto o bot.
// ===================================================================
// This bot is just an example. When you type "ping" in a Discord channel, the bot responds with the message "pong".
// Este bot es solo un ejemplo. Cuando escribes "ping" en un canal de Discord, el bot responde con el mensaje "pong".
const { Client, Events, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});
client.on("message", msg => {
if (msg.content === "ping") {
msg.reply("pong");
}
})
// Change your discord bot token here
// Cambia aquí tu token de Discord Bot
client.login('Your token here')