summaryrefslogtreecommitdiff
path: root/commands/squeak.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/squeak.js')
-rw-r--r--commands/squeak.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/commands/squeak.js b/commands/squeak.js
new file mode 100644
index 0000000..02ef20a
--- /dev/null
+++ b/commands/squeak.js
@@ -0,0 +1,20 @@
+module.exports = {
+ name: 'squeak',
+ description: '',
+ async execute(msg, args, bot) {
+ if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
+ const connection = await msg.member.voiceChannel.join();
+ const dispatcher = connection.playFile('./assets/audio/squeak.wav', {
+ volume: 0.2
+ });
+
+ 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');
+ }
+ }
+} \ No newline at end of file