aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-22 20:05:19 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-22 20:05:19 -0400
commit8e33b17eaf018ed250fcd26924c3aed5c6d5f6ec (patch)
tree569e312fc0a3d2ef4d340178b323330b62c0c225
parentb42e97519c5157c70cbb8ef0a16e66b204f57284 (diff)
downloadDLAP-8e33b17eaf018ed250fcd26924c3aed5c6d5f6ec.tar.gz
DLAP-8e33b17eaf018ed250fcd26924c3aed5c6d5f6ec.tar.bz2
DLAP-8e33b17eaf018ed250fcd26924c3aed5c6d5f6ec.zip
Changed help and new command
-rw-r--r--README.md1
-rw-r--r--bot.js12
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;