aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-20 16:57:03 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-20 16:57:03 -0400
commit2bba86c3bf5319dadc050bd492dfe243dcd77bf6 (patch)
tree1517431c73313d131dcff40d096b5e6917acbaac
parentd449fa9b3ab26e495939ff36067fe7978006b1d4 (diff)
downloadDLAP-2bba86c3bf5319dadc050bd492dfe243dcd77bf6.tar.gz
DLAP-2bba86c3bf5319dadc050bd492dfe243dcd77bf6.tar.bz2
DLAP-2bba86c3bf5319dadc050bd492dfe243dcd77bf6.zip
Removed skip and finally made the music loopable!
-rw-r--r--README.md16
-rw-r--r--bot.js14
-rw-r--r--package.json2
3 files changed, 26 insertions, 6 deletions
diff --git a/README.md b/README.md
index 0260dd8..c03e199 100644
--- a/README.md
+++ b/README.md
@@ -10,4 +10,20 @@ Make a new file called `config.json`
"voiceChannel": "voice_channel_id",
"botOwner": "your_id_here"
}
+```
+
+# Help Command
+```
+Public Only
+-----------
+help - Displays commands
+ping - Pong!
+git - Links to the source repo
+about - About the bot
+
+Bot Owner Only
+--------------
+join - Joins voice chat
+leave - Leaves voice chat
+stop - Stops bot
``` \ No newline at end of file
diff --git a/bot.js b/bot.js
index 5574241..982045c 100644
--- a/bot.js
+++ b/bot.js
@@ -35,7 +35,11 @@ function playAudio() {
console.log('Now playing ' + audio);
let serviceChannel = client.channels.cache.get('606602551634296968');
serviceChannel.send('**Project Jul-2020 Bot:**\nNow playing ' + audio);
-
+
+ dispatcher.on('finish', () => {
+ playAudio();
+ });
+
}).catch(e => {
console.error(e);
});
@@ -45,6 +49,9 @@ client.on('ready', () => {
console.log('Bot is ready!')
console.log(`Logged in as ${client.user.tag}!`);
console.log(`Prefix: ${config.prefix}`);
+ console.log(`Owner ID: ${config.botOwner}`)
+ console.log(`Voice Channel: ${config.voiceChannel}`)
+
client.user.setStatus('invisible');
playAudio();
});
@@ -59,7 +66,7 @@ client.on('message', async msg => {
// Public allowed commands
if (command == 'help') {
- msg.channel.send(`Bot help:\n\`\`\`${config.prefix}help\n${config.prefix}ping\n${config.prefix}git\n${config.prefix}about\n\`\`\``)
+ msg.channel.send(`Bot help:\n\`\`\`${config.prefix}help\n${config.prefix}ping\n${config.prefix}git\n${config.prefix}about\n\nFeel free to either lower the volume or mute me if it gets annoying!\n\`\`\``)
}
if (command == 'ping') {
@@ -83,9 +90,6 @@ client.on('message', async msg => {
msg.reply('Joining voice channel.');
playAudio();
}
- if (command == 'skip') {
-
- }
if (command == 'leave') {
const channel = client.channels.cache.get(config.voiceChannel);
diff --git a/package.json b/package.json
index 8806178..d72dcb0 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "Project-Jul-2020-Discord-Bot",
"version": "1.0.0",
"main": "bot.js",
- "license": "MIT",
+ "license": "GPL-3.0",
"scripts": {
"dev": "nodemon bot.js"
},