Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

đŸš‘ïž HOTFIX #147

Merged
merged 1 commit into from
Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 139 additions & 111 deletions src/events/discord/client/ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,118 +53,146 @@ module.exports = {
: "Off"
}\` \n Autoplay: \`${queue.autoplay ? "On" : "Off"}\``;
client.distube
.on("playSong", (queue, song) =>
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Lecture de \`${song.name}\` - \`${song.formattedDuration}\``
)
.addFields([
{
name: `Infos :`,
value: `${status(queue)}`,
inline: true,
},
{
name: `Demandé par :`,
value: `${song.user}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
)
.on("addSong", (queue, song) =>
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Ajout de ${song.name} - \`${song.formattedDuration}\``
)
.addFields([
{
name: `Demandé par :`,
value: `${song.user}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
)
.on("addList", (queue, playlist) =>
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Ajout de la playlist \`${playlist.name}\` (${playlist.songs.length} musiques) Ă  la liste de lecture`
)
.addFields([
{
name: `Infos`,
value: `${status(queue)}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
)
.on("playSong", (queue, song) => {
try {
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Lecture de \`${song.name}\` - \`${song.formattedDuration}\``
)
.addFields([
{
name: `Infos :`,
value: `${status(queue)}`,
inline: true,
},
{
name: `Demandé par :`,
value: `${song.user}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
})
.on("addSong", (queue, song) => {
try {
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Ajout de ${song.name} - \`${song.formattedDuration}\``
)
.addFields([
{
name: `Demandé par :`,
value: `${song.user}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
})
.on("addList", (queue, playlist) => {
try {
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription(
`đŸŽ¶ | Ajout de la playlist \`${playlist.name}\` (${playlist.songs.length} musiques) Ă  la liste de lecture`
)
.addFields([
{
name: `Infos`,
value: `${status(queue)}`,
inline: true,
},
])
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
})
.on("error", (channel, e) => {
if (channel)
channel.send(
`⛔ | An error encountered: ${e.toString().slice(0, 1974)}`
);
else console.error(e);
try {
if (channel)
channel.send(
`⛔ | An error encountered: ${e.toString().slice(0, 1974)}`
);
else console.error(e);
} catch (e) {
console.error(e);
}
})
.on("empty", (queue) => {
try {
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Red")
.setDescription(
"⛔ | Je me sens seul.e dans le salon vocal, je quitte le salon vocal..."
)
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
})
.on("searchNoResult", (message, query) => {
try {
message.channel.send({
embeds: [
new EmbedBuilder()
.setColor("Red")
.setDescription(`⛔ | Aucun rĂ©sultat trouvĂ© pour : ${query}!`)
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
})
.on("empty", (channel) =>
channel.send({
embeds: [
new EmbedBuilder()
.setColor("Red")
.setDescription(
"⛔ | Je me sens seul.e dans le salon vocal, je quitte le salon vocal..."
)
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
)
.on("searchNoResult", (message, query) =>
message.channel.send({
embeds: [
new EmbedBuilder()
.setColor("Red")
.setDescription(`⛔ | Aucun rĂ©sultat trouvĂ© pour : ${query}!`)
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
)
.on("finish", (queue) =>
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription("🏁 | Liste de lecture terminĂ©e!")
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
})
);
.on("finish", (queue) => {
try {
queue.textChannel.send({
embeds: [
new EmbedBuilder()
.setColor("Green")
.setDescription("🏁 | Liste de lecture terminĂ©e!")
.setFooter({
text: `Powered by Distube \nUpdated by Doc_Landerf \n© Doc_Landerf all rights reserved`,
}),
],
});
} catch (e) {
console.log(e);
}
});
},
};