discord_bot/commands/info/botinfo.js
SileNce5k 1ea4892167
Update to make it work on discord.js v13
* Use intents
* Use messageCreate instead of message
* Update sending embeds for v13
* Fix getNickname for v13
* Fix user presence
* guild.member to guild.members.cache.get
* Fix userinfo (+ some other minor changes)
2021-08-09 20:15:03 +02:00

24 lines
No EOL
837 B
JavaScript

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}\nCreation Date: ${getCreationDate(client)}\nSource: [Click Here](https://github.com/SileNce5k/discord_bot)`,
},)
message.channel.send({embeds :[embed]})
}
};