start discordbot?

This commit is contained in:
2021-04-04 23:49:23 +02:00
parent 6d84704b1f
commit 87eb023012

19
run.js
View File

@@ -1 +1,18 @@
// Start my Discord on NodeJS xD
// Start my Discord on NodeJS xD
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === 'unk.ping') {
msg.reply('Pong!');
}
if (msg.content === 'unk.help') {
msg.reply('Help');
}
});
client.login('token');