forked from embee/woomy
update dependencies
This commit is contained in:
parent
8058f3dced
commit
42bb347bbf
2 changed files with 11 additions and 13 deletions
14
package.json
14
package.json
|
@ -4,26 +4,24 @@
|
||||||
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
|
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/opus": "^0.3.2",
|
"@discordjs/opus": "^0.4.0",
|
||||||
"better-sqlite3": "^7.1.1",
|
"better-sqlite3": "^7.1.2",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"dblapi.js": "^2.4.1",
|
"dblapi.js": "^2.4.1",
|
||||||
"discord.js": "^12.4.0",
|
"discord.js": "^12.5.1",
|
||||||
"enmap": "^5.8.0",
|
"enmap": "^5.8.4",
|
||||||
|
"ffmpeg-static": "^4.2.7",
|
||||||
"hastebin-gen": "^2.0.5",
|
"hastebin-gen": "^2.0.5",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"moment-duration-format": "^2.3.2",
|
"moment-duration-format": "^2.3.2",
|
||||||
"nekos.life": "^2.0.5",
|
"nekos.life": "^2.0.5",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"prism-media": "^1.2.1",
|
|
||||||
"randomcolor": "^0.6.2",
|
"randomcolor": "^0.6.2",
|
||||||
"relevant-urban": "^2.0.0",
|
"relevant-urban": "^2.0.0",
|
||||||
"request": "^2.88.2",
|
|
||||||
"to-zalgo": "^1.0.1",
|
"to-zalgo": "^1.0.1",
|
||||||
"urban": "^0.3.2",
|
"urban": "^0.3.2",
|
||||||
"weather-js": "^2.0.0",
|
"weather-js": "^2.0.0",
|
||||||
"ytdl-core": "^3.4.2",
|
"ytdl-core": "^4.4.5"
|
||||||
"ytdl-core-discord": "^1.2.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
|
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
|
||||||
|
|
||||||
const ytdl = require('ytdl-core-discord')
|
const ytdl = require('ytdl-core')
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
const { MessageEmbed } = require('discord.js')
|
const { MessageEmbed } = require('discord.js')
|
||||||
const { utc } = require('moment')
|
const { utc } = require('moment')
|
||||||
|
@ -54,6 +54,8 @@ exports.getVideoByQuery = async function (client, query, message) {
|
||||||
return message.channel.send('<:error:466995152976871434> An error has occured: ' + e)
|
return message.channel.send('<:error:466995152976871434> An error has occured: ' + e)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(parsed)
|
||||||
|
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
const videos = parsed
|
const videos = parsed
|
||||||
if (videos) {
|
if (videos) {
|
||||||
|
@ -194,15 +196,13 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
|
||||||
const v = guild.queue[0]
|
const v = guild.queue[0]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let link = exports.getLinkFromID(v.video.videoId);
|
|
||||||
|
|
||||||
let y = null;
|
let y = null;
|
||||||
/*setTimeout(() => {
|
/*setTimeout(() => {
|
||||||
if(y == null) {
|
if(y == null) {
|
||||||
console.log('[MUSIC DEBUG] y is still null');
|
console.log('[MUSIC DEBUG] y is still null');
|
||||||
};
|
};
|
||||||
}, 5000);*/
|
}, 5000);*/
|
||||||
y = await ytdl(link, { highWaterMark: 1024 * 1024 * 32 });
|
y = await ytdl(exports.getLinkFromID(v.video.videoId) || v.video.videoId, { highWaterMark: 1024 * 1024 * 32 });
|
||||||
|
|
||||||
guild.dispatcher = connection.play(y, { type: 'opus' });
|
guild.dispatcher = connection.play(y, { type: 'opus' });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -212,7 +212,7 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
|
||||||
guild.queue.pop()
|
guild.queue.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
client.logger.error('(YT API change, disregard) ' + err)
|
client.logger.error(err.stack)
|
||||||
return message.channel.send(`<:error:466995152976871434> An error has occured: \n\`${err}\``)
|
return message.channel.send(`<:error:466995152976871434> An error has occured: \n\`${err}\``)
|
||||||
// return message.channel.send('<:error:466995152976871434> YouTube have made changes to their site that break Woomy\'s music module. An announcement will be made in the development server when this issue is resolved.')
|
// return message.channel.send('<:error:466995152976871434> YouTube have made changes to their site that break Woomy\'s music module. An announcement will be made in the development server when this issue is resolved.')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue