1 |
import { formatDistanceStrict, formatDistanceToNowStrict } from "date-fns"; |
import { formatDistanceStrict, formatDistanceToNowStrict } from "date-fns"; |
2 |
import { APIEmbedField } from "discord-api-types/v9"; |
import { APIEmbedField } from "discord-api-types/v9"; |
3 |
import { Util, Message, Interaction, CacheType, CommandInteraction } from "discord.js"; |
import { Util, Message, CacheType, CommandInteraction } from "discord.js"; |
4 |
import Client from "../../client/Client"; |
import Client from "../../client/Client"; |
5 |
import MessageEmbed from "../../client/MessageEmbed"; |
import MessageEmbed from "../../client/MessageEmbed"; |
6 |
import CommandOptions from "../../types/CommandOptions"; |
import CommandOptions from "../../types/CommandOptions"; |
7 |
import InteractionOptions from "../../types/InteractionOptions"; |
import InteractionOptions from "../../types/InteractionOptions"; |
8 |
import { emoji } from "../../utils/Emoji"; |
import { emoji } from "../../utils/Emoji"; |
9 |
import getUser from "../../utils/getUser"; |
import getUser from "../../utils/getUser"; |
|
import { parseUser } from "../../utils/parseInput"; |
|
10 |
import BaseCommand from "../../utils/structures/BaseCommand"; |
import BaseCommand from "../../utils/structures/BaseCommand"; |
11 |
|
import { getUserBadges } from "./ProfileCommand"; |
12 |
|
|
13 |
export default class UserLookupCommand extends BaseCommand { |
export default class UserLookupCommand extends BaseCommand { |
14 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
80 |
} |
} |
81 |
]; |
]; |
82 |
|
|
83 |
|
embed.setThumbnail(user.displayAvatarURL()); |
84 |
|
|
85 |
if (member) { |
if (member) { |
86 |
fields.push({ |
fields.push({ |
87 |
name: "Joined Server", |
name: "Joined Server", |
152 |
} |
} |
153 |
} |
} |
154 |
|
|
155 |
|
const badges = getUserBadges(user).join('\n'); |
156 |
|
|
157 |
|
fields.push({ |
158 |
|
name: "Badges", |
159 |
|
value: badges.trim() === '' ? '*No badges found*' : badges |
160 |
|
}); |
161 |
|
|
162 |
fields = [...fields, ...fieldsCommon]; |
fields = [...fields, ...fieldsCommon]; |
163 |
embed.setFields(fields); |
embed.setFields(fields); |
164 |
embed.setTimestamp(); |
embed.setTimestamp(); |