From 8e33b17eaf018ed250fcd26924c3aed5c6d5f6ec Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 22 Jul 2020 20:05:19 -0400 Subject: Changed help and new command --- README.md | 1 + bot.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b593567..065d061 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Public Only help - Displays commands. ping - Pong! git - Links to the source repo. +playing - Tells you what it's playing at the moment. about - About the bot. Bot Owner Only diff --git a/bot.js b/bot.js index 736bcb5..f6c496f 100644 --- a/bot.js +++ b/bot.js @@ -93,8 +93,11 @@ client.on('message', async msg => { // Public allowed commands if (command == 'help') { + if (!message.guild.member(client.user).hasPermission('EMBED_LINKS')) return message.reply('ERROR: This bot doesn\'t have the permission to send embed links please enable them to use the full help.'); const helpEmbed = new Discord.MessageEmbed() - .addField('Bot Help', `${config.prefix}help\n${config.prefix}ping\n${config.prefix}git\n${config.prefix}about\n`) + .setAuthor(`${client.user.username} Help`, client.user.avatarURL) + .setDescription(`Currently playing \`${audio}\`.`) + .addField(`Commands`, `${config.prefix}help\n${config.prefix}ping\n${config.prefix}git\n${config.prefix}playing\n${config.prefix}about\n`) .setFooter('© Copyright 2020 Andrew Lee. Licensed with GPL-3.0.') .setColor('#0066ff') @@ -108,9 +111,14 @@ client.on('message', async msg => { if (command == 'git') { msg.reply('This is the source code of this project.\nhttps://github.com/Alee14/DLMP3'); } + + if (command == 'playing') { + msg.channel.send('Currently playing `' + audio + '`.'); + } + if (command == 'about') { - msg.channel.send('This bot was created by Andrew Lee. Written in Discord.JS and licensed with GPL-3.0.'); + msg.channel.send('The bot code was created by Andrew Lee (Alee#4277). Written in Discord.JS and licensed with GPL-3.0.'); } if (![config.botOwner].includes(msg.author.id)) return; -- cgit v1.2.3