some update

This commit is contained in:
Snowflake107 2021-05-10 11:16:10 +05:45
parent e16811b4c8
commit d5e29d7cdd
3 changed files with 8 additions and 2 deletions

View file

@ -65,6 +65,7 @@
"@discordjs/opus": "^0.5.0",
"@types/node": "^14.14.41",
"@types/ws": "^7.4.1",
"discord-api-types": "^0.18.1",
"discord.js": "^12.5.3",
"discord.js-docgen": "discordjs/docgen#ts-patch",
"jsdoc-babel": "^0.5.0",

View file

@ -229,7 +229,7 @@ export class Player extends EventEmitter {
pl: true
});
return data[0];
if (data.length) return data[0];
})
);
@ -238,7 +238,7 @@ export class Player extends EventEmitter {
const pl = {
...playlist,
tracks,
duration: tracks.reduce((a, c) => a + c.durationMS, 0),
duration: tracks?.reduce((a, c) => a + (c?.durationMS ?? 0), 0) ?? 0,
thumbnail: playlist.images[0]?.url ?? tracks[0].thumbnail
};

View file

@ -1785,6 +1785,11 @@ diff@^4.0.1:
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
discord-api-types@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.18.1.tgz#5d08ed1263236be9c21a22065d0e6b51f790f492"
integrity sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg==
discord-ytdl-core@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/discord-ytdl-core/-/discord-ytdl-core-5.0.3.tgz#a31560f0bede41d6fc969377083ae958deac2b72"