1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00

Compare commits

..

No commits in common. "68e1d236cc8b41b76a07b00cdc19f03a53d4f159" and "aa8278ac8003f58cf811edcd4c1e819ee4f459cf" have entirely different histories.

View File

@ -44,22 +44,9 @@ export default {
{name: `🔹 Roles: ${member.roles.cache.size - 1}`, value: member.roles.cache.size > 1 ? member.roles.cache.filter(x=>x.id !== interaction.guild.roles.everyone.id).sort((a,b)=>b.position - a.position).map(x=>x).join(member.roles.cache.size > 4 ? ' ' : '\n').slice(0,1024) : 'No roles'} {name: `🔹 Roles: ${member.roles.cache.size - 1}`, value: member.roles.cache.size > 1 ? member.roles.cache.filter(x=>x.id !== interaction.guild.roles.everyone.id).sort((a,b)=>b.position - a.position).map(x=>x).join(member.roles.cache.size > 4 ? ' ' : '\n').slice(0,1024) : 'No roles'}
) )
if (member.premiumSinceTimestamp !== null) embed.addFields({name: '🔹 Server Boosting since', value: `<t:${Math.round(member.premiumSinceTimestamp/1000)}>\n<t:${Math.round(member.premiumSinceTimestamp/1000)}:R>`, inline: true}) if (member.premiumSinceTimestamp !== null) embed.addFields({name: '🔹 Server Boosting since', value: `<t:${Math.round(member.premiumSinceTimestamp/1000)}>\n<t:${Math.round(member.premiumSinceTimestamp/1000)}:R>`, inline: true})
if (!presence) embed.addFields({name: `🔹 Status: `, value: '\u200b'}) if (!presence) embed.addFields({name: `🔹 Status: Unavailable to be fetched`, value: '\u200b'})
if (member.presence) embed.addFields({name: `🔹 Status:`, value: `${member.presence.status === 'offline' ? '⚫' : `Desktop: ${convert(presence.desktop)}\nWeb: ${convert(presence.web)}\nMobile: ${convert(presence.mobile)}`}`, inline: true}) if (member.presence) embed.addFields({name: `🔹 Status: ${member.presence.status}`, value: `${member.presence.status === 'offline' ? '⚫' : `Desktop: ${convert(presence.desktop)}\nWeb: ${convert(presence.web)}\nMobile: ${convert(presence.mobile)}`}`, inline: true})
embedArray.push(embed) embedArray.push(embed)
if (member.presence.activities.find(a=>a.type === 2)) {
const spotifyStatus = member.presence?.activities.find(a=>a.name === 'Spotify') as Discord.Activity;
const spotifyEmbed = new client.embed()
.setColor('#1DB954') // Thanks Copilot, I never knew I needed this shade of green. It's actually looks like Spotify's color.
.setThumbnail(spotifyStatus?.assets.largeImageURL())
.setAuthor({name: 'Spotify', iconURL: 'https://cdn.discordapp.com/emojis/510214342034325504.webp?quality=lossless'})
.addFields(
{name: 'Artist', value: spotifyStatus?.state, inline: true},
{name: 'Album', value: spotifyStatus?.details, inline: true},
{name: 'Started', value: `<t:${Math.round(spotifyStatus?.timestamps.start as unknown as number/1000)}>\n<t:${Math.round(spotifyStatus?.timestamps.start as unknown as number/1000)}:R>`, inline: false}
)
embedArray.push(spotifyEmbed)
}
interaction.reply({embeds: embedArray}) interaction.reply({embeds: embedArray})
} }
}, },
@ -70,4 +57,4 @@ export default {
.setName('member') .setName('member')
.setDescription('Member or user to view their information') .setDescription('Member or user to view their information')
.setRequired(true)) .setRequired(true))
} }