update: all packages to discord.js v14

This commit is contained in:
2026-06-28 13:53:03 +02:00
parent 167b4dfebb
commit 6bee8ccc09
7 changed files with 1907 additions and 4481 deletions
+1882 -4466
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -20,23 +20,23 @@
"author": "Raphix", "author": "Raphix",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/voice": "^0.18.0", "@discordjs/voice": "^0.19.2",
"cors": "^2.8.5", "cors": "^2.8.5",
"debug": "^4.4.3", "debug": "^4.4.3",
"discord-player": "^7.1.0", "discord-player": "^6.2.1",
"discord.js": "^14.18.0", "discord.js": "^14.26.4",
"ffmpeg-static": "^5.2.0", "ffmpeg-static": "^5.2.0",
"ffprobe": "^1.1.2", "ffprobe": "^1.1.2",
"ffprobe-static": "^3.1.0", "ffprobe-static": "^3.1.0",
"fluent-ffmpeg": "^2.1.3", "fluent-ffmpeg": "^2.1.3",
"googleapis": "^149.0.0", "googleapis": "^173.0.0",
"https-proxy-agent": "^7.0.6", "https-proxy-agent": "^7.0.6",
"libsodium-wrappers": "^0.7.15", "libsodium-wrappers": "^0.7.15",
"loguix": "^1.4.2", "loguix": "^1.4.2",
"mime-types": "^3.0.1", "mime-types": "^3.0.1",
"miniget": "^4.2.3", "miniget": "^4.2.3",
"nodemon": "^3.1.10", "nodemon": "^3.1.10",
"pm2": "^6.0.11", "pm2": "^6.0.14",
"socket.io": "^4.8.1", "socket.io": "^4.8.1",
"soundcloud.ts": "^0.6.3", "soundcloud.ts": "^0.6.3",
"spotify-web-api-node": "^5.0.2", "spotify-web-api-node": "^5.0.2",
+1 -1
View File
@@ -104,7 +104,7 @@ function init() {
client.on("interactionCreate", async (interaction) => { client.on("interactionCreate", async (interaction) => {
if(!interaction.isCommand()) return; if(!interaction.isChatInputCommand()) return;
var numberOfCommands = new metric.Metric("numberOfCommands", "Nombre de commandes éxécutées") var numberOfCommands = new metric.Metric("numberOfCommands", "Nombre de commandes éxécutées")
numberOfCommands.setValue(numberOfCommands.getValue() + 1) numberOfCommands.setValue(numberOfCommands.getValue() + 1)
+3 -3
View File
@@ -9,17 +9,17 @@ class Button extends ButtonBuilder {
this.setStyle(ButtonStyle.Link); this.setStyle(ButtonStyle.Link);
} else{ } else{
this.setCustomId(customId) this.setCustomId(customId)
this.setStyle(style);
} }
this.setStyle(style);
} }
setDisabled(disabled) { setDisabled(disabled) {
return this.setDisabled(disabled); return super.setDisabled(disabled);
} }
setEmoji(emoji) { setEmoji(emoji) {
return this.setEmoji(emoji); return super.setEmoji(emoji);
} }
} }
+2 -2
View File
@@ -38,10 +38,10 @@ class Command {
SlashCommand.addNumberOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required)) SlashCommand.addNumberOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required))
} }
if(SelOption.type === "SUB_COMMAND") { if(SelOption.type === "SUB_COMMAND") {
SlashCommand.addSubcommand(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required)) SlashCommand.addSubcommand(option => option.setName(SelOption.name).setDescription(SelOption.description))
} }
if(SelOption.type === "SUB_COMMAND_GROUP") { if(SelOption.type === "SUB_COMMAND_GROUP") {
SlashCommand.addSubcommandGroup(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required)) SlashCommand.addSubcommandGroup(option => option.setName(SelOption.name).setDescription(SelOption.description))
} }
if(SelOption.type === "MENTIONABLE") { if(SelOption.type === "MENTIONABLE") {
SlashCommand.addMentionableOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required)) SlashCommand.addMentionableOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required))
+1 -1
View File
@@ -12,7 +12,7 @@ const command = new Command("about", "Affiche des informations sur le bot", (cli
const embed = new Embed(interaction) const embed = new Embed(interaction)
embed.setColor(237, 12, 91) embed.setColor(237, 12, 91)
embed.setThumbnail("https://cdn.discordapp.com/avatars/" + client.user.id + "/" + client.user.avatar + ".png") embed.setThumbnail(client.user.displayAvatarURL({ extension: "png" }))
embed.setTitle('Subsonics - Chopin') embed.setTitle('Subsonics - Chopin')
embed.addField('Informations',"") embed.addField('Informations',"")
embed.addField('Version', packageJson.version + " ", true) embed.addField('Version', packageJson.version + " ", true)
+13 -3
View File
@@ -11,6 +11,8 @@ class Embed {
if(interaction) { if(interaction) {
interaction.deferReply({ ephemeral: ephemeral }).then(() => { interaction.deferReply({ ephemeral: ephemeral }).then(() => {
this.isSended = true this.isSended = true
}).catch(() => {
this.isSended = true
}) })
this.interaction = interaction this.interaction = interaction
this.ephemeral = ephemeral this.ephemeral = ephemeral
@@ -28,7 +30,11 @@ class Embed {
} }
setAuthor(author) { setAuthor(author) {
this.embed.setAuthor(author) if (typeof author === "string") {
this.embed.setAuthor({ name: author })
} else {
this.embed.setAuthor(author)
}
return this return this
} }
@@ -56,7 +62,11 @@ class Embed {
} }
setFooter(footer) { setFooter(footer) {
this.embed.setFooter(footer) if (typeof footer === "string") {
this.embed.setFooter({ text: footer })
} else {
this.embed.setFooter(footer)
}
return this return this
} }
@@ -71,7 +81,7 @@ class Embed {
} }
addBotPicture(client) { addBotPicture(client) {
this.embed.setThumbnail("https://cdn.discordapp.com/avatars/" + client.user.id + "/" + client.user.avatar + ".png") this.embed.setThumbnail(client.user.displayAvatarURL({ extension: "png" }))
} }
addField(name, value, inline) { addField(name, value, inline) {