diff options
Diffstat (limited to 'fix')
| -rw-r--r-- | fix/fun/dm.js | 51 | ||||
| -rw-r--r-- | fix/utility/botstatus.js | 124 | ||||
| -rw-r--r-- | fix/voice/fart.js | 208 | ||||
| -rw-r--r-- | fix/voice/moan.js | 170 | ||||
| -rw-r--r-- | fix/voice/squeak.js | 172 | ||||
| -rw-r--r-- | fix/voice/wahoo.js | 32 |
6 files changed, 757 insertions, 0 deletions
diff --git a/fix/fun/dm.js b/fix/fun/dm.js new file mode 100644 index 0000000..fc10f28 --- /dev/null +++ b/fix/fun/dm.js @@ -0,0 +1,51 @@ +const { Command } = require('discord.js-commando'); +const { RichEmbed } = require('discord.js'); + +module.exports = class DMFun extends Command { + constructor(client) { + super(client, { + name: 'dm', + aliases: [ + 'directmessage', + 'directmsg', + 'direct-message', + 'direct-msg' + ], + group: 'fun', + memberName: 'dm', + description: 'dm someone', + guildOnly: true, + args: [ + { + key: 'msgContent', + prompt: 'what would u like to send', + type: 'string' + } + ], + examples: [ + 's5n!dm @sin#1337 hi', + 's5n!directmessage @sin#1337 hey', + 's5n!directmsg @sin#1337 hello', + 's5n!direct-message @sin#1337 yo', + 's5n!direct-msg @sin#1337 aye', + ] + }); + } + run(msg, { msgContent }) { + if (msg.author) { + if (!msg.mentions.users.first() && msgContent) { + msg.reply('you haven\'t specified anyone to send to.'); + } else { + var sendTo = msg.mentions.users.first().id; + var d = new Date(msg.createdTimestamp); + + msg.guild.members.fetch(sendTo, false).then(messageUser => { + messageUser.send(msgContent); + msg.reply('sent :D'); + }); + } + } else { + msg.reply('insufficent perms bruh'); + } + } +};
\ No newline at end of file diff --git a/fix/utility/botstatus.js b/fix/utility/botstatus.js new file mode 100644 index 0000000..ccf7e68 --- /dev/null +++ b/fix/utility/botstatus.js @@ -0,0 +1,124 @@ +const { Command } = require('discord.js-commando'); +const emoji = require('discord.js'); + +module.exports = class BotStatusUtility extends Command { + constructor(client) { + super(client, { + name: 'botstatus', + aliases: ['status', 'bs'], + group: 'utility', + memberName: 'botstatus', + description: 'Allows you to change the bots status', + args: [ + { + key: 'userChangeType', + prompt: 'would you like to change the status message or type?', + type: 'string' + }, + { + key: 'userActivityName', + prompt: 'what would u like the message 2 be?', + type: 'string' + }, + { + key: 'userActivityType', + prompt: 'what would u like the status type to be?', + type: 'string' + } + ], + guildOnly: true, + examples: [ + 's5n!botstatus type watching', + 's5n!status t w', + 's5n!status message youtube', + 's5n!bs m lol' + ] + }); + } + run(msg, { userActivityName, userActivityType }) { + if (msg.member.hasPermission('KICK_MEMBERS')) { + var activityType = this.client.user.presence.activities[0].type; + var activityName = this.client.user.presence.activities[0].name; + + function activityTypeToWords() { + if (activityName == '0') { + var activityName = 'PLAYING'; + } else if (activityName == '1') { + var activityName = 'STREAMING'; + } else if (activityName == '2') { + var activityName = 'LISTENING'; + } else if (activityName == '3') { + var activityName = 'WATCHING'; + } + } + + if (userChangeType == 'reset' || userChangeType == 'r') { + this.client.user.setActivity('psycho ~uwu', { + type: 'LISTENING' + }); + msg.reply('status has been reset lol ' + emoji.random()); + } else if (userChangeType == 'format' || userChangeType == 'f') { + // Print full, proper format for the Discord.js setActivity() function + msg.reply('\n`' + this.client.user.setActivity.toString() + '`'); + } else if (userChangeType == 'message' || userChangeType == 'msg' || userChangeType == 'm') { + // This took way to long to complete lol, 2020/04/08, 00:12, my birthday lol + if (userChangeType == 'message') { + var m = userChangeType.join(' '); + var mf = m.slice(8, 22); + } else if (userChangeType == 'msg') { + var m = userChangeType.join(' '); + var mf = m.slice(4, 22); + } else if (userChangeType == 'm') { + var m = userChangeType.join(' '); + var mf = m.slice(2, 22); + } + + if (mf == 'reset' || mf == 'r') { + this.client.user.setActivity('psycho ~uwu', { + type: activityType + }); + + msg.reply('status message has been reset lol'); + } else { + this.client.user.setActivity(mf, { + type: activityType + }); + } + } else if (userChangeType == 'userChangeType' || args == 't') { + var m = userChangeType; + userChangeType.toLowerCase(); + if (userChangeType == 'playing' || userChangeType == 'p') { + var m = 'playing'; + + this.client.user.setActivity(activityName, { + type: 'playing' + }); + } else if (userChangeType == 'listening' || userChangeType == 'l') { + var m = 'LISTENING'; + + this.client.user.setActivity(activityName, { + type: m + }); + } else if (userChangeType == 'watching' || userChangeType == 'w') { + var m = 'WATCHING'; + + this.client.user.setActivity(activityName, { + type: m + }); + } else if (userChangeType == 'custom' || userChangeType == 'c') { + msg.reply('custom status is disabled due to discord api policies about self-botting :('); + } else if (userChangeType == 'reset' || userChangeType == 'r') { + this.client.user.setActivity(activityName, { + type: 'LISTENING' + }); + + msg.reply('status type has been reset lol'); + } + } else if (!args) { + msg.reply('no arguments specified'); + } + } else { + msg.reply('insufficent perms bruh'); + } + } +};
\ No newline at end of file diff --git a/fix/voice/fart.js b/fix/voice/fart.js new file mode 100644 index 0000000..a5f8a21 --- /dev/null +++ b/fix/voice/fart.js @@ -0,0 +1,208 @@ +// TODO: shits broken bc i cant get variables from different scopes +/* +const ytdl = require('ytdl-core'); +const { Command } = require('discord.js-commando'); +const { MessageEmbed } = require('discord.js'); +const Youtube = require('simple-youtube-api'); +//const { youtubeAPI } = require('../../config.json'); +const youtube = new Youtube('AIzaSyB9xJENORzZt-GmOGx4WsNCPgKSIxhJcds'); +const emoji = require('emoji-random'); +module.exports = class FartVoice extends Command { + constructor(client) { + super(client, { + name: 'fart', + group: 'voice', + memberName: 'fart', + description: 'gives you a random fart', + guildOnly: true, + clientPermissions: ['SPEAK', 'CONNECT'], + examples: ['s5n!fart'] + }); + } + async run(msg) { + var fartNum = Math.floor((Math.random() * 8) + 1); + if (fartNum == 1) { + var fartMsg = 'you got fart 1, courtesy of sin ' + emoji.random(); + var fartTitle = 'fart 1'; + var fartAudio = '../../../assets/audio/farts/1.mp3'; + } else if (fartNum == 2) { + var fartMsg = 'you got fart 2, courtesy of sin ' + emoji.random(); + var fartTitle = 'fart 2'; + var fartAudio = '../../../assets/audio/farts/2.mp3'; + } else if (fartNum == 3) { + var fartMsg = 'you got fart 3, courtesy of sin ' + emoji.random(); + var fartTitle = 'fart 3'; + var fartAudio = '../../../assets/audio/farts/3.mp3'; + } else if (fartNum == 4) { + var fartMsg = 'you got fart 4, courtesy of sin ' + emoji.random(); + var fartTitle = 'fart 4'; + var fartAudio = '../../../assets/audio/farts/4.mp3'; + } else if (fartNum == 5) { + var fartMsg = 'you got fart 5, courtesy of sin ' + emoji.random(); + var fartTitle = 'fart 5'; + var fartAudio = '../../../assets/audio/farts/5.mp3'; + } else if (fartNum == 6) { + var fartMsg = 'you got fart 6, courtesy of nick ' + emoji.random(); + var fartTitle = 'fart 6'; + var fartAudio = '../../../assets/audio/farts/6.mp3'; + } else if (fartNum == 7) { + var fartMsg = 'you got fart 7, courtesy of nick ' + emoji.random(); + var fartTitle = 'fart 7'; + var fartAudio = '../../../assets/audio/farts/7.mp3'; + } else if (fartNum == 8) { + var fartMsg = 'you got fart 8, courtesy of nick ' + emoji.random(); + var fartTitle = 'fart 8'; + var fartAudio = '../../../assets/audio/farts/8.mp3'; + } + + const voiceChannel = msg.member.voice.channel; + if (!voiceChannel) return msg.say('join a channel and try again ' + emoji.random()); + + const video = await fartAudio; + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // return msg.say("I don't support live streams!"); + // } + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // return msg.say('I cannot play videos longer than 1 hour'); + // } + // // can be uncommented if you want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + this.constructSongObj(video, voiceChannel) + ); + if ( + msg.guild.musicData.isPlaying == false || + typeof msg.guild.musicData.isPlaying == 'undefined' + ) { + msg.guild.musicData.isPlaying = true; + return this.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + msg.reply(fartMsg); + msg.say(fartTitle, 'added to queue ' + emoji.random()); + return + } + + var that = this; + msg.channel + .awaitMessages( + function (msg) { + return (msg.content > 0 && msg.content < 6) || msg.content === 'exit'; + }, { + max: 1, + time: 60000, + errors: ['time'] + } + ) + .then(function (response) { + const videoIndex = parseInt(response.first().content); + if (response.first().content === 'exit') return songEmbed.delete(); + youtube + .then(function (video) { + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // songEmbed.delete(); + // return msg.say("I don't support live streams!"); + // } + + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // songEmbed.delete(); + // return msg.say('I cannot play videos longer than 1 hour'); + // } + + // // can be uncommented if you don't want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // songEmbed.delete(); + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + that.constructSongObj(video, voiceChannel) + ); + if (msg.guild.musicData.isPlaying == false) { + msg.guild.musicData.isPlaying = true; + if (songEmbed) { + songEmbed.delete(); + } + that.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say(fartTitle, 'added to queue ' + emoji.random()); + } + }) + .catch(function () { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say( + 'an error has occured when trying to get the video file ' + emoji.random() + ); + }); + }); + } + playSong(queue, msg) { + const classThis = this; // use classThis instead of 'this' because of lexical scope below + queue[0].voiceChannel + .join() + .then(function (connection) { + const dispatcher = connection + .play( + fartAudio // TODO: broken here + ) + .on('start', function () { + msg.guild.musicData.songDispatcher = dispatcher; + const volume = 100 / 100; + msg.guild.musicData.volume = volume; + dispatcher.setVolume(msg.guild.musicData.volume); + const videoEmbed = new MessageEmbed() + .setThumbnail(queue[0].thumbnail) + .setColor(0xF97DAE) + .addField('now playing:', queue[0].title) + .addField('duration:', queue[0].duration); + if (queue[1]) videoEmbed.addField('next song:', queue[1].title); + msg.say(videoEmbed); + msg.guild.musicData.nowPlaying = queue[0]; + return queue.shift(); + }) + .on('finish', function () { + if (queue.length >= 1) { + return classThis.playSong(queue, msg); + } else { + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + } + }) + .on('error', function (e) { + msg.say('can\'t play song ' + emoji.random()); + console.error(e); + msg.guild.musicData.queue.length = 0; + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + }); + }) + .catch(function (e) { + console.error(e); + return msg.guild.me.voice.channel.leave(); + }); + } + constructSongObj(video, voiceChannel) { + return { // TODO: and broken here + url: 'fart', + title: 'fart 1', + voiceChannel + }; + } +};
\ No newline at end of file diff --git a/fix/voice/moan.js b/fix/voice/moan.js new file mode 100644 index 0000000..c5d0f96 --- /dev/null +++ b/fix/voice/moan.js @@ -0,0 +1,170 @@ +// TODO: eventually fix this by uploading the audio to youtube and if i havent already copy and paste the code from abee +/* +//const ytdl = require('ytdl-core'); +const { Command } = require('discord.js-commando'); +const { MessageEmbed } = require('discord.js'); +const Youtube = require('simple-youtube-api'); +//const { youtubeAPI } = require('../../config.json'); +const youtube = new Youtube('AIzaSyB9xJENORzZt-GmOGx4WsNCPgKSIxhJcds'); +const emoji = require('emoji-random'); +module.exports = class MoanVoice extends Command { + constructor(client) { + super(client, { + name: 'moan', + group: 'voice', + memberName: 'moan', + description: 'uhhhh', + guildOnly: true, + clientPermissions: ['SPEAK', 'CONNECT'], + examples: ['s5n!moan', 's5n!uhhhh'] + }); + } + async run(msg) { + const voiceChannel = msg.member.voice.channel; + if (!voiceChannel) return msg.say('join a channel and try again ' + emoji.random()); + + const video = '../../../assets/audio/uhhhh.wav'; + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // return msg.say("I don't support live streams!"); + // } + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // return msg.say('I cannot play videos longer than 1 hour'); + // } + // // can be uncommented if you want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + this.constructSongObj(video, voiceChannel) + ); + if ( + msg.guild.musicData.isPlaying == false || + typeof msg.guild.musicData.isPlaying == 'undefined' + ) { + msg.guild.musicData.isPlaying = true; + return this.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + return msg.say('uhhhh added to queue ' + emoji.random()); + } + + var that = this; + msg.channel + .awaitMessages( + function (msg) { + return (msg.content > 0 && msg.content < 6) || msg.content === 'exit'; + }, { + max: 1, + time: 60000, + errors: ['time'] + } + ) + .then(function (response) { + const videoIndex = parseInt(response.first().content); + if (response.first().content === 'exit') return songEmbed.delete(); + youtube + .then(function (video) { + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // songEmbed.delete(); + // return msg.say("I don't support live streams!"); + // } + + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // songEmbed.delete(); + // return msg.say('I cannot play videos longer than 1 hour'); + // } + + // // can be uncommented if you don't want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // songEmbed.delete(); + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + that.constructSongObj(video, voiceChannel) + ); + if (msg.guild.musicData.isPlaying == false) { + msg.guild.musicData.isPlaying = true; + if (songEmbed) { + songEmbed.delete(); + } + that.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say(fartTitle, 'added to queue ' + emoji.random()); + } + }) + .catch(function () { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say( + 'an error has occured when trying to get the video file ' + emoji.random() + ); + }); + }); + } + playSong(queue, msg) { + const classThis = this; // use classThis instead of 'this' because of lexical scope below + queue[0].voiceChannel + .join() + .then(function (connection) { + const dispatcher = connection + .play( + '../../../assets/audio/uhhhh.wav' + ) + .on('start', function () { + msg.guild.musicData.songDispatcher = dispatcher; + const volume = 100 / 100; + msg.guild.musicData.volume = volume; + dispatcher.setVolume(msg.guild.musicData.volume); + const videoEmbed = new MessageEmbed() + .setThumbnail(queue[0].thumbnail) + .setColor(0xF97DAE) + .addField('now playing:', 'uhhhh') + .addField('duration:', 'no'); + if (queue[1]) videoEmbed.addField('next song:', queue[1].title); + msg.say(videoEmbed); + msg.guild.musicData.nowPlaying = queue[0]; + return queue.shift(); + }) + .on('finish', function () { + if (queue.length >= 1) { + return classThis.playSong(queue, msg); + } else { + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + } + }) + .on('error', function (e) { + msg.say('can\'t play song ' + emoji.random()); + console.error(e); + msg.guild.musicData.queue.length = 0; + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + }); + }) + .catch(function (e) { + console.error(e); + return msg.guild.me.voice.channel.leave(); + }); + } + constructSongObj(video, voiceChannel) { + return { // TODO: and broken here + title: 'uhhhh', + voiceChannel + }; + } +};
\ No newline at end of file diff --git a/fix/voice/squeak.js b/fix/voice/squeak.js new file mode 100644 index 0000000..c25547d --- /dev/null +++ b/fix/voice/squeak.js @@ -0,0 +1,172 @@ +// TODO: eventually fix this by uploading the audio to youtube and if i havent already copy and paste the code from abee +/* +//const ytdl = require('ytdl-core'); +const { Command } = require('discord.js-commando'); +const { MessageEmbed } = require('discord.js'); +const Youtube = require('simple-youtube-api'); +//const { youtubeAPI } = require('../../config.json'); +const youtube = new Youtube('AIzaSyB9xJENORzZt-GmOGx4WsNCPgKSIxhJcds'); +const emoji = require('emoji-random'); +module.exports = class SqueakVoice extends Command { + constructor(client) { + super(client, { + name: 'squeak', + group: 'voice', + memberName: 'squeak', + description: 'squeak :D', + guildOnly: true, + clientPermissions: ['SPEAK', 'CONNECT'], + examples: ['s5n!squeak'] + }); + } + async run(msg) { + const voiceChannel = msg.member.voice.channel; + if (!voiceChannel) return msg.say('join a channel and try again ' + emoji.random()); + + //const video = await fartAudio; + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // return msg.say("I don't support live streams!"); + // } + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // return msg.say('I cannot play videos longer than 1 hour'); + // } + // // can be uncommented if you want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + this.constructSongObj(video, voiceChannel) + ); + if ( + msg.guild.musicData.isPlaying == false || + typeof msg.guild.musicData.isPlaying == 'undefined' + ) { + msg.guild.musicData.isPlaying = true; + return this.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + msg.reply(fartMsg); + msg.say(fartTitle, 'added to queue ' + emoji.random()); + return + } + + var that = this; + msg.channel + .awaitMessages( + function (msg) { + return (msg.content > 0 && msg.content < 6) || msg.content === 'exit'; + }, { + max: 1, + time: 60000, + errors: ['time'] + } + ) + .then(function (response) { + const videoIndex = parseInt(response.first().content); + if (response.first().content === 'exit') return songEmbed.delete(); + youtube + .then(function (video) { + // // can be uncommented if you don't want the bot to play live streams + // if (video.raw.snippet.liveBroadcastContent === 'live') { + // songEmbed.delete(); + // return msg.say("I don't support live streams!"); + // } + + // // can be uncommented if you don't want the bot to play videos longer than 1 hour + // if (video.duration.hours !== 0) { + // songEmbed.delete(); + // return msg.say('I cannot play videos longer than 1 hour'); + // } + + // // can be uncommented if you don't want to limit the queue + // if (msg.guild.musicData.queue.length > 10) { + // songEmbed.delete(); + // return msg.say( + // 'There are too many songs in the queue already, skip or wait a bit' + // ); + // } + msg.guild.musicData.queue.push( + that.constructSongObj(video, voiceChannel) + ); + if (msg.guild.musicData.isPlaying == false) { + msg.guild.musicData.isPlaying = true; + if (songEmbed) { + songEmbed.delete(); + } + that.playSong(msg.guild.musicData.queue, msg); + } else if (msg.guild.musicData.isPlaying == true) { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say(fartTitle, 'added to queue ' + emoji.random()); + } + }) + .catch(function () { + if (songEmbed) { + songEmbed.delete(); + } + return msg.say( + 'an error has occured when trying to get the video file ' + emoji.random() + ); + }); + }); + } + playSong(queue, msg) { + const classThis = this; // use classThis instead of 'this' because of lexical scope below + queue[0].voiceChannel + .join() + .then(function (connection) { + const dispatcher = connection + .play( + '../../../assets/audio/uhhhh.wav' + ) + .on('start', function () { + msg.guild.musicData.songDispatcher = dispatcher; + const volume = 100 / 100; + msg.guild.musicData.volume = volume; + dispatcher.setVolume(msg.guild.musicData.volume); + const videoEmbed = new MessageEmbed() + .setThumbnail(queue[0].thumbnail) + .setColor(0xF97DAE) + .addField('now playing:', 'uhhhh') + .addField('duration:', 'no'); + if (queue[1]) videoEmbed.addField('next song:', queue[1].title); + msg.say(videoEmbed); + msg.guild.musicData.nowPlaying = queue[0]; + return queue.shift(); + }) + .on('finish', function () { + if (queue.length >= 1) { + return classThis.playSong(queue, msg); + } else { + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + } + }) + .on('error', function (e) { + msg.say('can\'t play song ' + emoji.random()); + console.error(e); + msg.guild.musicData.queue.length = 0; + msg.guild.musicData.isPlaying = false; + msg.guild.musicData.nowPlaying = null; + msg.guild.musicData.songDispatcher = null; + return msg.guild.me.voice.channel.leave(); + }); + }) + .catch(function (e) { + console.error(e); + return msg.guild.me.voice.channel.leave(); + }); + } + constructSongObj(video, voiceChannel) { + return { // TODO: and broken here + title: 'uhhhh', + voiceChannel + }; + } +};
\ No newline at end of file diff --git a/fix/voice/wahoo.js b/fix/voice/wahoo.js new file mode 100644 index 0000000..25424f5 --- /dev/null +++ b/fix/voice/wahoo.js @@ -0,0 +1,32 @@ +// TODO: eventually fix this by uploading the audio to youtube and if i havent already copy and paste the code from abee +/* +const { Command } = require('discord.js-commando'); +const emoji = require('emoji-random'); + +module.exports = class WahooVoice extends Command { + constructor(client) { + super(client, { + name: 'wahoo', + aliases: ['mario'], + group: 'voice', + memberName: 'wahoo', + description: 'wahoo', + guildOnly: true, + examples: ['s5n!wahoo', 's5n!mario'] + }); + } + async run(msg) { + if (msg.member.voice.channel && !msg.guild.voice) { + const connection = await msg.member.voice.channel.join(); + const dispatcher = connection.play('../../../assets/audio/wahoo.mp3'); + + dispatcher.on('finish', () => { + connection.disconnect(); + }); + } else if (msg.guild.voice) { + msg.reply('i\'m already playing that lol ' + emoji.random()); + } else { + msg.reply('you need to join a voice channel first silly ' + emoji.random()); + } + } +};
\ No newline at end of file |