mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
2 files changed
+28
-11
No files matched your search
+20
-10
@@ -107,13 +107,16 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
error.type === 'TypeError' &&
|
(error.type === 'TypeError' &&
|
||||||
(error.message.includes(
|
(error.message.includes(
|
||||||
'Cannot read properties of null (reading \'createStream\')'
|
'Cannot read properties of null (reading \'createStream\')'
|
||||||
) ||
|
) ||
|
||||||
error.message.includes(
|
error.message.includes(
|
||||||
'Failed to fetch resources for ytdl streaming'
|
'Failed to fetch resources for ytdl streaming'
|
||||||
))
|
))) ||
|
||||||
|
error.message.includes(
|
||||||
|
'Could not extract stream for this track'
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
@@ -168,7 +171,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: interaction.member.nickname || interaction.user.username,
|
name:
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.user.username,
|
||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
@@ -191,7 +196,10 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: interaction.member.nickname || interaction.member.nickname || interaction.user.username,
|
name:
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.user.username,
|
||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
@@ -207,7 +215,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: interaction.member.nickname || interaction.user.username,
|
name:
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.user.username,
|
||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
|
|||||||
@@ -35,7 +35,14 @@ for (const file of systemCommandFiles) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const player = new Player(client, {
|
const player = new Player(client, {
|
||||||
useLegacyFFmpeg: false
|
useLegacyFFmpeg: false,
|
||||||
|
ytdlOptions: {
|
||||||
|
requestOptions: {
|
||||||
|
headers: {
|
||||||
|
cookie: process.env.YOUTUBE_COOKIE || ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeCreateStream(async (track) => {
|
onBeforeCreateStream(async (track) => {
|
||||||
|
|||||||
Reference in new issue
Block a user