Add Expires Never code

This commit is contained in:
Christopher Cookman 2024-06-16 22:37:00 -06:00
parent fc21d450c8
commit 9e0343c48f
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -110,7 +110,7 @@ client.on('inviteCreate', (invite) => { //if someone creates an invite while bot
name: "New Invite",
// inline check, if expiry is in over 100 years, then it's never, otherwise it's the date
// ${invite.expiresTimestamp > 95617584000 ? "Never" : `<t:${invite.expiresTimestamp}>`
value: `Code: ${invite.code}\nMax Uses: ${invite.maxUses || "∞"}\nExpires <t:${Math.floor(new Date(invite.expiresAt) / 1000)}:R>\nCreated at: <t:${Math.floor(new Date(invite.createdAt) / 1000)}>`
value: `Code: ${invite.code}\nMax Uses: ${invite.maxUses || "∞"}\nExpires: ${invite.expiresAt <= 0 ? "Never" : `<t:${Math.floor(new Date(invite.expiresAt) / 1000)}:R>`}\nCreated at: <t:${Math.floor(new Date(invite.createdAt) / 1000)}>`
},
{
name: "Guild",
@ -158,7 +158,7 @@ client.on('guildMemberAdd', async (member) => { // We're just gonna always send
},
{
name: "Invite",
value: `Inviter: ${(invite.inviter.id == client.user.id) ? "Custom Invite URL (Through Bot)" : `${invite.inviter} (${invite.inviter.displayName})`}\nCode: ${invite.code}\nUses: ${invite.uses}/${invite.maxUses ||"∞"}\nExpires: <t:${Math.floor(new Date(invite.expiresAt) / 1000)}:R>\nCreated at: <t:${Math.floor(new Date(invite.createdAt) / 1000)}>`
value: `Inviter: ${(invite.inviter.id == client.user.id) ? "Custom Invite URL (Through Bot)" : `${invite.inviter} (${invite.inviter.displayName})`}\nCode: ${invite.code}\nUses: ${invite.uses}/${invite.maxUses ||"∞"}\nExpires: ${invite.expiresAt <= 0 ? "Never" : `<t:${Math.floor(new Date(invite.expiresAt) / 1000)}:R>`}\nCreated at: <t:${Math.floor(new Date(invite.createdAt) / 1000)}>`
},
{
name: "Guild",