mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Fix up embed formatting
This commit is contained in:
parent
baa5d9406a
commit
13ead1f086
@ -7,9 +7,11 @@ export default class GuildBanAdd {
|
||||
if (!banLog) return console.log(`Member was banned from ${member.guild.name} but no audit log for this member.`)
|
||||
const {executor, target, reason } = banLog;
|
||||
if (target.id === member.user.id) {
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048})).setTitle(`Member Banned: ${target.username}`).setDescription(`🔹 **User**\n<@${target.id}>\n\`${target.id}\``).addFields(
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048}))
|
||||
.setTitle(`Member Banned: ${target.username}`).addFields(
|
||||
{name: '🔹 User', value: `<@${target.id}>\n\`${target.id}\``},
|
||||
{name: '🔹 Moderator', value: `<@${executor.id}>\n\`${executor.id}\``},
|
||||
{name: '🔹 Reason', value: `${reason === null ? 'Reason unspecified': reason}`}
|
||||
{name: '🔹 Reason', value: reason === null ? 'Reason unspecified': reason}
|
||||
);
|
||||
if (!await client.userLevels.fetchUser(member.user.id)) embed.setFooter({text: 'Rank data has been wiped.'});
|
||||
(client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds: [embed]})
|
||||
|
@ -8,7 +8,9 @@ export default class GuildMemberRemove {
|
||||
let isBot = 'Bot';
|
||||
if (!member.user.bot) isBot = 'Member';
|
||||
const levelData = await client.userLevels.fetchUser(member.id);
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048}) as string).setTitle(`${isBot} Left: ${member.user.username}`).setDescription(`<@${member.user.id}>\n\`${member.user.id}\``).addFields(
|
||||
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setThumbnail(member.user.displayAvatarURL({size: 2048}) as string)
|
||||
.setTitle(`${isBot} Left: ${member.user.username}`).addFields(
|
||||
{name: '🔹 User', value: `<@${member.user.id}>\n\`${member.user.id}\``},
|
||||
{name: '🔹 Account Creation Date', value: `<t:${Math.round(member.user.createdTimestamp/1000)}>\n<t:${Math.round(member.user.createdTimestamp/1000)}:R>`},
|
||||
{name: '🔹 Server Join Date', value: `<t:${Math.round(member.joinedTimestamp/1000)}>\n<t:${Math.round(member.joinedTimestamp/1000)}:R>`},
|
||||
{name: `🔹 Roles: ${member.roles.cache.size - 1}`, value: `${member.roles.cache.size > 1 ? member.roles.cache.filter((x)=>x.id !== member.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'}`, inline: true}
|
||||
|
Loading…
Reference in New Issue
Block a user