forked from Galactic/galactic-bot
utilising discord's timestamp thingy
This commit is contained in:
parent
c53d2a96bc
commit
c195e4c651
@ -1,5 +1,4 @@
|
|||||||
const { MessageEmbed } = require("discord.js");
|
const { MessageEmbed } = require("discord.js");
|
||||||
const { Util } = require("../../../../utilities");
|
|
||||||
const { SlashCommand } = require("../../../interfaces");
|
const { SlashCommand } = require("../../../interfaces");
|
||||||
|
|
||||||
const Tiers = {
|
const Tiers = {
|
||||||
@ -28,7 +27,7 @@ class GuildCommand extends SlashCommand {
|
|||||||
publicThread = 0,
|
publicThread = 0,
|
||||||
privateThread = 0;
|
privateThread = 0;
|
||||||
|
|
||||||
const createdAt = `${guild.createdAt.toDateString()} (${Util.humanise(Math.floor((Date.now() - guild.createdTimestamp) / 1000), true)})`,
|
const createdAt = `<t:${Math.floor(guild.createdTimestamp / 1000)}:D> (<t:${Math.floor(guild.createdTimestamp / 1000)}:R>)`,
|
||||||
description = guild.description || interaction.guild._settings.description || interaction.format('COMMAND_GUILD_NODESC'),
|
description = guild.description || interaction.guild._settings.description || interaction.format('COMMAND_GUILD_NODESC'),
|
||||||
maxMembers = guild.maximumMembers,
|
maxMembers = guild.maximumMembers,
|
||||||
maxPresences = guild.maximumPresences,
|
maxPresences = guild.maximumPresences,
|
||||||
|
@ -83,7 +83,7 @@ class InformationCommand extends SlashCommand {
|
|||||||
value: interaction.format('COMMAND_INFO_USER_DATA', {
|
value: interaction.format('COMMAND_INFO_USER_DATA', {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
bot: user.bot ? ` ${Emojis.bot}` : '',
|
bot: user.bot ? ` ${Emojis.bot}` : '',
|
||||||
created: `${user.createdAt.toDateString()} (${Util.timeAgo(user.createdTimestamp / 1000)})`,
|
created: `<t:${Math.floor(user.createdTimestamp / 1000)}:D> (<t:${Math.floor(user.createdTimestamp / 1000)}:R>)`,
|
||||||
status: member?.presence?.status || 'N/A',
|
status: member?.presence?.status || 'N/A',
|
||||||
globalActivity: user.lastMessage ? user.lastMessage.createdAt.toDateString() : 'N/A'
|
globalActivity: user.lastMessage ? user.lastMessage.createdAt.toDateString() : 'N/A'
|
||||||
}),
|
}),
|
||||||
@ -109,7 +109,7 @@ class InformationCommand extends SlashCommand {
|
|||||||
name: interaction.format('COMMAND_INFO_MEMBER_NAME'),
|
name: interaction.format('COMMAND_INFO_MEMBER_NAME'),
|
||||||
value: interaction.format('COMMAND_INFO_MEMBER', {
|
value: interaction.format('COMMAND_INFO_MEMBER', {
|
||||||
nickname: member.nickname ? member.nickname : 'N/A',
|
nickname: member.nickname ? member.nickname : 'N/A',
|
||||||
joined: member.joinedAt ? `${member.joinedAt.toDateString()} (${Util.timeAgo(member.joinedTimestamp / 1000)})` : 'N/A',
|
joined: member.joinedAt ? `<t:${Math.floor(member.joinedTimestamp / 1000)}:D> (<t:${Math.floor(member.joinedTimestamp / 1000)}:R>)` : 'N/A',
|
||||||
serverActivity: member.lastMessage ? member.lastMessage.createdAt.toDateString() : 'N/A'
|
serverActivity: member.lastMessage ? member.lastMessage.createdAt.toDateString() : 'N/A'
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
@ -142,7 +142,7 @@ class InformationCommand extends SlashCommand {
|
|||||||
const embed = {
|
const embed = {
|
||||||
title: role.name,
|
title: role.name,
|
||||||
description: interaction.format('COMMAND_INFO_ROLE', {
|
description: interaction.format('COMMAND_INFO_ROLE', {
|
||||||
created: `${role.createdAt.toDateString()} (${Util.timeAgo(role.createdTimestamp / 1000)})`,
|
created: `<t:${Math.floor(role.createdTimestamp/1000)}:D> (<t:${Math.floor(role.createdTimestamp/1000)}:R>)`, //`${role.createdAt.toDateString()} (${Util.timeAgo(role.createdTimestamp / 1000)})`,
|
||||||
members: members.size,
|
members: members.size,
|
||||||
colour: role.hexColor
|
colour: role.hexColor
|
||||||
}),
|
}),
|
||||||
@ -169,7 +169,7 @@ class InformationCommand extends SlashCommand {
|
|||||||
const embed = {
|
const embed = {
|
||||||
title: channel.name,
|
title: channel.name,
|
||||||
description: interaction.format('COMMAND_INFO_CHANNEL_BASE', {
|
description: interaction.format('COMMAND_INFO_CHANNEL_BASE', {
|
||||||
created: `${channel.createdAt.toDateString()} (${Util.timeAgo(channel.createdTimestamp / 1000)})`,
|
created: `<t:${Math.floor(channel.createdTimestamp)}:D> (<t:${Math.floor(channel.createdTimestamp)}:R>)`,
|
||||||
type: channel.type
|
type: channel.type
|
||||||
}),
|
}),
|
||||||
footer: {
|
footer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user