diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-07-20 16:16:19 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-07-20 16:16:19 -0400 |
| commit | cd19676edd81612d97008948e4ae1a57fa394e0f (patch) | |
| tree | efa2746b385873ee2c83dd2cb7d01645589e8df4 | |
| parent | 2c4a38fa4b41023f7f59cdce5242cb440751dbd0 (diff) | |
| download | DLAP-cd19676edd81612d97008948e4ae1a57fa394e0f.tar.gz DLAP-cd19676edd81612d97008948e4ae1a57fa394e0f.tar.bz2 DLAP-cd19676edd81612d97008948e4ae1a57fa394e0f.zip | |
Help and git; Made ping a public command
| -rw-r--r-- | bot.js | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -52,15 +52,27 @@ client.on('message', async msg => { if (msg.author.bot) return; if (!msg.guild) return; if (!msg.content.startsWith(config.prefix)) return; - if (![config.botOwner].includes(msg.author.id)) return; - let command = msg.content.split(' ')[0]; command = command.slice(config.prefix.length); + // Public allowed commands + + if (command == 'help') { + msg.channel.send(`Bot help:\n\`\`\`${config.prefix}help\n${config.prefix}ping\n${config.prefix}git\n\`\`\``) + } + + if (command == 'git') { + msg.reply("This is the source code of this project.\nhttps://github.com/Alee14/PJ2020-Discord-Bot") + } + if (command == 'ping') { msg.reply('Pong!'); } + if (![config.botOwner].includes(msg.author.id)) return; + + // Bot owner exclusive + if (command == 'stop') { await msg.reply('Powering off...') console.log('Powering off...'); |
