update: all packages to discord.js v14
This commit is contained in:
Generated
+1882
-4466
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -20,23 +20,23 @@
|
||||
"author": "Raphix",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@discordjs/voice": "^0.18.0",
|
||||
"@discordjs/voice": "^0.19.2",
|
||||
"cors": "^2.8.5",
|
||||
"debug": "^4.4.3",
|
||||
"discord-player": "^7.1.0",
|
||||
"discord.js": "^14.18.0",
|
||||
"discord-player": "^6.2.1",
|
||||
"discord.js": "^14.26.4",
|
||||
"ffmpeg-static": "^5.2.0",
|
||||
"ffprobe": "^1.1.2",
|
||||
"ffprobe-static": "^3.1.0",
|
||||
"fluent-ffmpeg": "^2.1.3",
|
||||
"googleapis": "^149.0.0",
|
||||
"googleapis": "^173.0.0",
|
||||
"https-proxy-agent": "^7.0.6",
|
||||
"libsodium-wrappers": "^0.7.15",
|
||||
"loguix": "^1.4.2",
|
||||
"mime-types": "^3.0.1",
|
||||
"miniget": "^4.2.3",
|
||||
"nodemon": "^3.1.10",
|
||||
"pm2": "^6.0.11",
|
||||
"pm2": "^6.0.14",
|
||||
"socket.io": "^4.8.1",
|
||||
"soundcloud.ts": "^0.6.3",
|
||||
"spotify-web-api-node": "^5.0.2",
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ function init() {
|
||||
|
||||
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")
|
||||
numberOfCommands.setValue(numberOfCommands.getValue() + 1)
|
||||
|
||||
@@ -9,17 +9,17 @@ class Button extends ButtonBuilder {
|
||||
this.setStyle(ButtonStyle.Link);
|
||||
} else{
|
||||
this.setCustomId(customId)
|
||||
this.setStyle(style);
|
||||
}
|
||||
this.setStyle(style);
|
||||
|
||||
}
|
||||
|
||||
setDisabled(disabled) {
|
||||
return this.setDisabled(disabled);
|
||||
return super.setDisabled(disabled);
|
||||
}
|
||||
|
||||
setEmoji(emoji) {
|
||||
return this.setEmoji(emoji);
|
||||
return super.setEmoji(emoji);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ class Command {
|
||||
SlashCommand.addNumberOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required))
|
||||
}
|
||||
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") {
|
||||
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") {
|
||||
SlashCommand.addMentionableOption(option => option.setName(SelOption.name).setDescription(SelOption.description).setRequired(SelOption.required))
|
||||
|
||||
@@ -12,7 +12,7 @@ const command = new Command("about", "Affiche des informations sur le bot", (cli
|
||||
|
||||
const embed = new Embed(interaction)
|
||||
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.addField('Informations',"")
|
||||
embed.addField('Version', packageJson.version + " ", true)
|
||||
|
||||
+13
-3
@@ -11,6 +11,8 @@ class Embed {
|
||||
if(interaction) {
|
||||
interaction.deferReply({ ephemeral: ephemeral }).then(() => {
|
||||
this.isSended = true
|
||||
}).catch(() => {
|
||||
this.isSended = true
|
||||
})
|
||||
this.interaction = interaction
|
||||
this.ephemeral = ephemeral
|
||||
@@ -28,7 +30,11 @@ class Embed {
|
||||
}
|
||||
|
||||
setAuthor(author) {
|
||||
this.embed.setAuthor(author)
|
||||
if (typeof author === "string") {
|
||||
this.embed.setAuthor({ name: author })
|
||||
} else {
|
||||
this.embed.setAuthor(author)
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -56,7 +62,11 @@ class Embed {
|
||||
}
|
||||
|
||||
setFooter(footer) {
|
||||
this.embed.setFooter(footer)
|
||||
if (typeof footer === "string") {
|
||||
this.embed.setFooter({ text: footer })
|
||||
} else {
|
||||
this.embed.setFooter(footer)
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -71,7 +81,7 @@ class Embed {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user