diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /fix | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'fix')
| -rw-r--r-- | fix/anime/neko.ts | 283 | ||||
| -rw-r--r-- | fix/fun/dm.ts | 63 | ||||
| -rw-r--r-- | fix/utility/math.ts | 56 | ||||
| -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 |
7 files changed, 0 insertions, 984 deletions
diff --git a/fix/anime/neko.ts b/fix/anime/neko.ts deleted file mode 100644 index 26c37c7..0000000 --- a/fix/anime/neko.ts +++ /dev/null @@ -1,283 +0,0 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; -import nekoClient from 'nekos.life'; -const neko = new nekoClient() - -module.exports = class NekoAnime extends Command { - constructor(client) { - super(client, { - name: 'neko', - aliases: ['kemonomimi', 'nekoslife', 'nekos-life', 'nekos.life'], - group: 'anime', - memberName: 'neko', - description: 'Allows you to choose from a wide variety of Neko images. (NSFW and SFW)', - nsfw: false, - examples: [ - 'uwu!neko', - 'uwu!kemonomimi', - 'uwu!nekoslife', - 'uwu!nekos-life', - 'uwu!nekos.life' - ], - args: [ - { - key: 'nekoNSFW', - prompt: 'NSFW or SFW? (NSFW only works in NSFW marked channels)', - type: 'string' - }, - { - key: 'nekoType', - prompt: 'What type of Neko would you like?', - type: 'string' - } - ] - }); - } - async run(msg: CommandoMessage, { nekoNSFW, nekoType }) { - if (nekoNSFW == 'sfw') { - var typeNum = Math.floor((Math.random() * 3) + 1); - if (nekoType == 'smug') { - neko.sfw.smug().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'baka') { - neko.sfw.baka().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'tickle') { - neko.sfw.tickle().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'slap') { - neko.sfw.slap().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'poke') { - neko.sfw.poke().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'pat') { - neko.sfw.pat().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'neko') { - // gif or no - } else if (nekoType == 'meow') { - neko.sfw.meow().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'lizard') { - neko.sfw.lizard().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'kiss') { - neko.sfw.kiss().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'hug') { - neko.sfw.hug().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'foxgirl') { - neko.sfw.foxGirl().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'feed') { - neko.sfw.feed().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'cuddle') { - neko.sfw.cuddle().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'kemo' || nekoType == 'kemonomimi') { - neko.sfw.kemonomimi().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'holo') { - neko.sfw.holo().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'woof') { - neko.sfw.woof().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'wallpaper') { - neko.sfw.wallpaper().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'goose') { - neko.sfw.goose().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'catgirl' || nekoType == 'gecg') { - neko.sfw.gecg().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'avatar') { - neko.sfw.avatar().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'neko') { - if (typeNum == 1) { - neko.sfw.neko().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.sfw.nekoGif().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else { - msg.reply('That was not an option.') - } - } else if (nekoNSFW == 'nsfw') { - var typeNum = Math.floor((Math.random() * 3) + 1); - if (!msg.channel.nsfw) msg.reply('This command must be used in a NSFW marked text channel.') - if (nekoType == 'pussy') { - if (typeNum == 1) { - neko.nsfw.pussy().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (typeNum == 2) { - neko.nsfw.pussyArt().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.pussyWankGif().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'lesbian' || nekoType == 'lesbo') { - neko.nsfw.lesbian().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'kuni') { - neko.nsfw.kuni().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'cumsluts' || nekoType == 'cumslut') { - neko.nsfw.cumsluts().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'classic') { - neko.nsfw.classic().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'boobs' || nekoType == 'boob') { - neko.nsfw.boobs().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'bj' || nekoType == 'blowjob') { - if (typeNum == 1) { - neko.nsfw.bJ().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.blowJob().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'anal') { - neko.nsfw.anal().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'yuri') { - if (typeNum == 1) { - neko.nsfw.yuri().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.eroYuri().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'trap') { - neko.nsfw.trap().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'tits') { - neko.nsfw.tits().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'girl' || nekoType == 'girlsolo' || nekoType == 'girl solo' || nekoType == 'girl-solo' || nekoType == 'girls') { - if (typeNum == 1) { - neko.nsfw.girlSolo().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.girlSoloGif().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'kitsune') { - if (typeNum == 1) { - neko.nsfw.kitsune().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.eroKitsune().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'keta') { - neko.nsfw.keta().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'hentai') { - if (typeNum == 1) { - neko.nsfw.hentai().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.randomHentaiGif().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'futanari') { - neko.nsfw.futanari().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'femdom') { - neko.nsfw.femdom().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'feet') { - if (typeNum == 1) { - neko.nsfw.feet().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (typeNum == 2) { - neko.nsfw.feetGif().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.eroFeet().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else if (nekoType == 'ero') { - neko.nsfw.ero().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'cumart') { - neko.nsfw.cumArts().then(result => { - msg.reply({ files: [result.url] }) - }) - } else if (nekoType == 'cum') { - if (typeNum == 1) { - neko.nsfw.cumArts().then(result => { - msg.reply({ files: [result.url] }) - }) - } else { - neko.nsfw.cumsluts().then(result => { - msg.reply({ files: [result.url] }) - }) - } - } else { - msg.reply('That was not an option.') - } - } else { - msg.reply('That was not an option.') - } - } -};
\ No newline at end of file diff --git a/fix/fun/dm.ts b/fix/fun/dm.ts deleted file mode 100644 index 73fa0b6..0000000 --- a/fix/fun/dm.ts +++ /dev/null @@ -1,63 +0,0 @@ -// TODO: remove mention from final msg - -import { Command, CommandoMessage } from 'discord.js-commando'; -import { MessageEmbed } from '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: 'Allows you to DM somebody as the bot.', - guildOnly: true, - args: [ - { - key: 'msgContent', - prompt: 'What message would you like to send?', - type: 'string' - } - ], - examples: [ - 'uwu!dm @sin#1337 hi', - 'uwu!directmessage @sin#1337 hey', - 'uwu!directmsg @sin#1337 hello', - 'uwu!direct-message @sin#1337 yo', - 'uwu!direct-msg @sin#1337 aye', - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'ADMINISTRATOR'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] - }); - } - run(msg: CommandoMessage, { msgContent }) { - if (msg.author.id == '217348698294714370') { - if (!msg.mentions.users.first() && msgContent) { - msg.reply('You haven\'t specified anyone to send a message to.'); - } else { - var sendTo = msg.mentions.users.first().id; - var d = new Date(msg.createdTimestamp); - - msg.guild.members.fetch(sendTo).then(messageUser => { - messageUser.send(msgContent); - - var emb = new MessageEmbed() - .setColor(0xFFCC4D) - .setTitle('uwufier - DM') - .addField('Message content', `${msgContent}`) - .addField('Recipient', `${msg.mentions.users.first()}`) - .addField('Sender', `${msg.author}`) - .addField('Time sent', `Now`) - msg.say(emb) - }); - } - } else { - msg.reply('Insufficent permissions.'); - } - } -};
\ No newline at end of file diff --git a/fix/utility/math.ts b/fix/utility/math.ts deleted file mode 100644 index a55edf1..0000000 --- a/fix/utility/math.ts +++ /dev/null @@ -1,56 +0,0 @@ -// TODO: get this working someday -import { Command, CommandoMessage } from 'discord.js-commando'; -import emoji from 'emoji-random'; - -module.exports = class MathUtility extends Command { - constructor(client) { - super(client, { - name: 'math', - group: 'utility', - memberName: 'math', - description: 'Allows you to do simple math operations.', - args: [ - { - key: 'mVal1', - prompt: 'First number?', - type: 'integer' - }, - { - key: 'mOp', - prompt: 'What operation would you like to use?', - type: 'string' - }, - { - key: 'mVal2', - prompt: 'Second number?', - type: 'integer' - } - ], - examples: [ - 'uwu!math 5 + 2' - ] - }); - } - async run(msg: CommandoMessage, { mVal1, mOp, mVal2 }) { - if (!mVal1 || !mOp || !mVal2) { - msg.reply('You are missing a critical part of the operation, please try again.') - } else { - var mSol - switch (mOp) { - case mOp = '+': - if (mVal1 < mVal2) mSol = mVal1 + mVal1; - break - case mOp = '-': - mSol = mVal1 - mVal1; - break - case mOp = '/': - mSol = mVal1 / mVal1; - break - case mOp = '*' || 'x': - mSol = mVal1 * mVal1; - break - } - await msg.reply(`**${mVal1}** ${mOp} **${mVal2}** = **${mSol}**.`) - } - } -};
\ No newline at end of file diff --git a/fix/voice/fart.js b/fix/voice/fart.js deleted file mode 100644 index a5f8a21..0000000 --- a/fix/voice/fart.js +++ /dev/null @@ -1,208 +0,0 @@ -// 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 deleted file mode 100644 index 8a2103e..0000000 --- a/fix/voice/moan.js +++ /dev/null @@ -1,170 +0,0 @@ -// 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 deleted file mode 100644 index c25547d..0000000 --- a/fix/voice/squeak.js +++ /dev/null @@ -1,172 +0,0 @@ -// 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 deleted file mode 100644 index 25424f5..0000000 --- a/fix/voice/wahoo.js +++ /dev/null @@ -1,32 +0,0 @@ -// 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 |