Rewrite createdate and joindate gets
Update botinfo to work with new getCreationDate Update userinfo to work with new getCreationDate Update userinfo to work with new getJoinDate
This commit is contained in:
parent
0d5502bc92
commit
49e6eaed11
6 changed files with 19 additions and 44 deletions
|
@ -1,21 +1,19 @@
|
|||
const Discord = require('discord.js');
|
||||
const { prefix } = require('../data/config.json');
|
||||
const creationJoinDates = require("../util/creationJoinDates")
|
||||
const getCreationDate = require('../util/getCreationDate');
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'botinfo',
|
||||
description: 'Shows information about the bot',
|
||||
execute({message, client}) {
|
||||
let createJoin = creationJoinDates(client.user)
|
||||
execute({message, client, prefix}) {
|
||||
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: ${client.guilds.toString().length}\nCreation Date: ${createJoin.creation}\nSource: [Click Here](https://github.com/SileNce5k/discord_bot)`,
|
||||
name: "General info", value: `Name: ${client.user.username}\nPrefix: ${prefix}\nTotal Servers: ${client.guilds.toString().length}\nCreation Date: ${getCreationDate(client.user)}\nSource: [Click Here](https://github.com/SileNce5k/discord_bot)`,
|
||||
},)
|
||||
|
||||
message.channel.send(embed)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const Discord = require('discord.js');
|
||||
const getCreationDate = require('../util/getCreationDate.js');
|
||||
const getJoinDate = require('../util/getJoinDate.js');
|
||||
const parseMention = require("../util/parseMention.js")
|
||||
const creationJoinDates = require("../util/creationJoinDates")
|
||||
|
||||
module.exports = {
|
||||
name: 'userinfo',
|
||||
|
@ -24,7 +25,7 @@ module.exports = {
|
|||
roleColor = user.roles.color.color;
|
||||
}
|
||||
|
||||
var createJoin = creationJoinDates(user.user)
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setThumbnail(user.user.avatarURL({ format: 'png', dynamic: true, size: 2048 }))
|
||||
.setColor(roleColor)
|
||||
|
@ -32,8 +33,8 @@ module.exports = {
|
|||
.setAuthor(user.user.username, user.user.avatarURL({ format: 'png', dynamic: true, size: 2048 }))
|
||||
.addField("Username", `**${user.user.username}#${user.user.discriminator}**${nickname}`)
|
||||
.addField("Presence", user.user.presence.activities[0].name)
|
||||
//.addField("Joined", createJoin.joindate, true)
|
||||
.addField("Creation date", createJoin.creation, true)
|
||||
.addField("Joined", getJoinDate(user, message.guild))
|
||||
.addField("Creation date", getCreationDate(user), true)
|
||||
.addField("Join date", user.joinDate, true)
|
||||
|
||||
message.channel.send(embed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue