music: fix createMessage calls
This commit is contained in:
parent
e1719fb12c
commit
8d47c64fd8
1 changed files with 12 additions and 12 deletions
|
@ -175,9 +175,9 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
|
||||||
await hf.bot.guilds
|
await hf.bot.guilds
|
||||||
.get(guild_id)
|
.get(guild_id)
|
||||||
.channels.get(text_id)
|
.channels.get(text_id)
|
||||||
.createMessage(
|
.createMessage({
|
||||||
":musical_note: Queue is empty, leaving voice channel."
|
content: ":musical_note: Queue is empty, leaving voice channel.",
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
state.player.off(AudioPlayerStatus.Idle, state.onEnd);
|
state.player.off(AudioPlayerStatus.Idle, state.onEnd);
|
||||||
voiceStorage.delete(guild_id);
|
voiceStorage.delete(guild_id);
|
||||||
|
@ -217,9 +217,9 @@ async function enqueue({
|
||||||
try {
|
try {
|
||||||
info = await ytdl.getInfo(url, {});
|
info = await ytdl.getInfo(url, {});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await textChannel.createMessage(
|
await textChannel.createMessage({
|
||||||
`:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``
|
content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
title = info?.videoDetails?.title;
|
title = info?.videoDetails?.title;
|
||||||
|
@ -261,9 +261,9 @@ async function enqueue({
|
||||||
try {
|
try {
|
||||||
info = await ffprobe(url).then((obj) => obj.format);
|
info = await ffprobe(url).then((obj) => obj.format);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
textChannel.createMessage(
|
textChannel.createMessage({
|
||||||
`:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``
|
content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
stream = !info.duration;
|
stream = !info.duration;
|
||||||
|
@ -337,9 +337,9 @@ async function enqueue({
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!media) {
|
if (!media) {
|
||||||
textChannel.createMessage(
|
textChannel.createMessage({
|
||||||
`:warning: No usable media was found for \`${url}\`. May possibly be due to region restrictions or paywalls.`
|
content: `:warning: No usable media was found for \`${url}\`. May possibly be due to region restrictions or paywalls.`,
|
||||||
);
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue