Fix embeds for serverinfo command
This commit is contained in:
parent
6c1c078e34
commit
96931c9952
1 changed files with 8 additions and 7 deletions
|
@ -1,20 +1,21 @@
|
|||
const Discord = require('discord.js');
|
||||
const {EmbedBuilder} = require('discord.js');
|
||||
const convertDateToISOString = require('../../util/convertDateToISOString');
|
||||
|
||||
module.exports = {
|
||||
name: 'serverinfo',
|
||||
description: 'Displays information about the server',
|
||||
execute({message}) {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
const embed = new EmbedBuilder()
|
||||
|
||||
.setThumbnail(message.guild.iconURL({ format: 'png', dynamic: true, size: 4096 }))
|
||||
.setColor("#ee7939")
|
||||
.setTimestamp()
|
||||
.addField("Server Owner: ", `<@${message.guild.ownerId}>`)
|
||||
.addField("Server Name: ", message.guild.name)
|
||||
.addField("Created", convertDateToISOString(message.guild.createdAt))
|
||||
.addField("Members: ", message.guild.memberCount.toString())
|
||||
//.addField("Emojis: ", message.guild.emojis.cache.array().length)
|
||||
.addFields([
|
||||
{name: "Server Owner", value: `<@${message.guild.ownerId}`, inline: false},
|
||||
{name: "Server Name", value: message.guild.name,inline: false},
|
||||
{name: "Created", value: convertDateToISOString(message.guild.createdAt),inline: false},
|
||||
{name: "Members: ", value: message.guild.memberCount.toString(),inline: false}
|
||||
])
|
||||
|
||||
message.channel.send({embeds :[embed]});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue