From 9e7d75927bc0f2fbc9fc2b8167a7e237c04dd934 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Wed, 5 Jun 2019 16:29:58 +0300 Subject: [PATCH] Update index.js --- index.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 530da424..4ac0c11e 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,21 @@ client.on('message', msg => { if (msg.author.username === 'Matte') { msg.channel.send('Bot is currently online hosted!') } - } + } + if (msg.content === '!restart') { + if (msg.member.username !== 'Matte') { + msg.channel.send(':x: I\'n´m sorry, You can\'t do that!') + } + if (msg.author.username === 'Matte') { + console.log('restarting...') + msg.channel.send('Restarting...') + } + } + if (msg.content === 'Restarting...') { + if (msg.author.username === 'Musix') { + msg.author.crash('done') + } + } if (msg.content === `${PREFIX}help`) { const embed = new Discord.RichEmbed() .setTitle('Commands for Musix!')