Nodejs

No description

fork
loading
Files
  • index.js
  • secret.env
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const Discord = require('discord.js');
const Secret  = require('secret.env');
const client = new Discord.Client();

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.reply('Pong!');
  }
});

client.login('token');
node v10.16.0