From 87eb023012b10a86eba3d1a6d0a4929941dd9791 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 4 Apr 2021 23:49:23 +0200 Subject: [PATCH] start discordbot? --- run.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/run.js b/run.js index 20e5fe0..4508283 100644 --- a/run.js +++ b/run.js @@ -1 +1,18 @@ -// Start my Discord on NodeJS xD \ No newline at end of file +// 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'); \ No newline at end of file