Update discord.js dependency to version 14 (#116)

* Update discord.js in package.json to v14.16.3 & update package-lock.json

* Update all embeds to work with v14

* Do not show discriminator if it is 0
This commit is contained in:
SileNce5k 2024-10-22 07:36:10 +02:00
parent c751a5aec2
commit 062e6d43dc
Signed by: SileNce
GPG key ID: B0A142BB4291B204
14 changed files with 1306 additions and 2437 deletions

View file

@ -1,24 +1,24 @@
const Discord = require('discord.js');
const getCreationDate = require('../../util/getCreationDate');
const getGuildCount = require('../../util/getGuildCount');
module.exports = {
name: 'botinfo',
description: 'Shows information about the bot',
execute({message, client, prefix}) {
let guildCount = getGuildCount(client)
const embed = new Discord.MessageEmbed()
.setColor(15780145)
.setTitle("Information about bot")
.setTimestamp()
.setAuthor(client.user.username, client.user.avatarURL({ dynamic: true, size: 4096 }))
.addFields({
name: "General info", value: `Name: ${client.user.username}\nPrefix: ${prefix}\nTotal Servers: ${guildCount}\nTotal Commands: ${client.commands.size}\nCreation Date: ${getCreationDate(client)}\nSource: [Click Here](https://github.com/SileNce5k/discord_bot)`,
},)
message.channel.send({embeds :[embed]})
}
const {EmbedBuilder} = require('discord.js');
const getCreationDate = require('../../util/getCreationDate');
const getGuildCount = require('../../util/getGuildCount');
module.exports = {
name: 'botinfo',
description: 'Shows information about the bot',
execute({message, client, prefix}) {
let guildCount = getGuildCount(client)
const embed = new EmbedBuilder()
.setColor(15780145)
.setTitle("Information about bot")
.setTimestamp()
.setAuthor({name: client.user.username, iconURL: client.user.avatarURL({ format: 'png', dynamic: true, size: 2048 })})
.addFields({
name: "General info", value: `Name: ${client.user.username}\nPrefix: ${prefix}\nTotal Servers: ${guildCount}\nTotal Commands: ${client.commands.size}\nCreation Date: ${getCreationDate(client)}\nSource: [Click Here](https://github.com/SileNce5k/discord_bot)`,
},)
message.channel.send({embeds :[embed]})
}
};