summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-07 05:16:54 -0700
committer8cy <[email protected]>2020-04-07 05:16:54 -0700
commit1b43856926e29e547a356fd42e33160f167e2138 (patch)
tree0f6f9430463376a4f28f32b38edd64b183cbec65
parentadded fart command lol, v1.2.9 (diff)
downloads5nical-1b43856926e29e547a356fd42e33160f167e2138.tar.xz
s5nical-1b43856926e29e547a356fd42e33160f167e2138.zip
added gavin wahoo 1.2.10
-rw-r--r--app.js20
-rw-r--r--assets/audio/wahoo.mp3bin0 -> 1726068 bytes
-rw-r--r--package.json3
3 files changed, 21 insertions, 2 deletions
diff --git a/app.js b/app.js
index 2822433..da340c3 100644
--- a/app.js
+++ b/app.js
@@ -4,6 +4,7 @@ const bot = new Discord.Client();
const isImageUrl = require('is-image-url');
const emoji = require('emoji-random');
const atquotes = require('at-quotes');
+const ytdl = require('ytdl-core');
bot.on('ready', () => {
console.log(`Started bot: ${bot.user.tag} (ID: ${bot.user.id})\nCurrently running on ${bot.guilds.size} server(s).`); // Startup dialouge in output console
@@ -351,7 +352,24 @@ bot.on('message', async msg => {
msg.reply('you need to join a voice channel first silly');
}
}
-
+
+ if (command == 'wahoo' | command == 'frozen' | command == 'frozenyyy') {
+ if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
+ const connection = await msg.member.voiceChannel.join();
+ const dispatcher = connection.playFile('./assets/audio/wahoo.mp3', {
+ volume: 1.0
+ });
+
+ dispatcher.on('end', () => {
+ msg.member.voiceChannel.leave();
+ })
+ } else if (msg.guild.voiceConnection) {
+ msg.reply('i\'m already playing that lol')
+ } else {
+ msg.reply('you need to join a voice channel first silly');
+ }
+ }
+
// Help
if (command == 'help') {
if (!args.length) {
diff --git a/assets/audio/wahoo.mp3 b/assets/audio/wahoo.mp3
new file mode 100644
index 0000000..b507034
--- /dev/null
+++ b/assets/audio/wahoo.mp3
Binary files differ
diff --git a/package.json b/package.json
index 7ce6df7..9e0f1e4 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"discord.js": "^11.6.3",
"emoji-random": "^0.1.2",
"ffmpeg-static": "^4.0.1",
- "is-image-url": "^1.1.8"
+ "is-image-url": "^1.1.8",
+ "ytdl-core": "^2.0.1"
}
}