mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
upgrade discord.js
This commit is contained in:
parent
036d46f08a
commit
3537305c59
32 changed files with 232 additions and 107 deletions
|
@ -130,11 +130,13 @@ export async function getChannelInfoEmbed(
|
|||
|
||||
if (channel.type === ChannelTypeStrings.PRIVATE_THREAD || channel.type === ChannelTypeStrings.PUBLIC_THREAD) {
|
||||
const thread = channel as ThreadChannel;
|
||||
const parentChannelName = thread.parent?.name ? thread.parent.name : `<#${thread.parentId}>`;
|
||||
const parentChannelName = thread.parent?.name ?? `<#${thread.parentId}>`;
|
||||
const memberCount = thread.memberCount ?? thread.members.cache.size;
|
||||
const owner = await pluginData.guild.members.fetch(thread.ownerId).catch(() => null);
|
||||
const ownerMention = owner ? verboseUserMention(owner.user) : "Unknown#0000";
|
||||
const humanizedArchiveTime = `Archive duration: **${humanizeDuration(thread.autoArchiveDuration * MINUTES)}**`;
|
||||
const owner = await thread.fetchOwner().catch(() => null);
|
||||
const ownerMention = owner?.user ? verboseUserMention(owner.user) : "Unknown#0000";
|
||||
const humanizedArchiveTime = `Archive duration: **${humanizeDuration(
|
||||
(thread.autoArchiveDuration ?? 0) * MINUTES,
|
||||
)}**`;
|
||||
|
||||
embed.fields.push({
|
||||
name: preEmbedPadding + "Thread information",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue