diff options
Diffstat (limited to 'src/listeners')
24 files changed, 110 insertions, 110 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index d8b33aa..83bb327 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -149,7 +149,7 @@ export default class CommandErrorListener extends BushListener { description.push(...options.haste); - embed.addField({ name: 'Stack Trace', value: options.stack.substring(0, 1024) }); + embed.addFields({ name: 'Stack Trace', value: options.stack.substring(0, 1024) }); if (description.length) embed.setDescription(description.join('\n').substring(0, 4000)); if (options.type === 'command-dev' || options.type === 'command-log') diff --git a/src/listeners/guild-custom/bushLockdown.ts b/src/listeners/guild-custom/bushLockdown.ts index badbb39..b27dfba 100644 --- a/src/listeners/guild-custom/bushLockdown.ts +++ b/src/listeners/guild-custom/bushLockdown.ts @@ -17,10 +17,10 @@ export default class BushLockdownListener extends BushListener { const logEmbed = new Embed() .setColor(util.colors.Blurple) .setTimestamp() - .addField({ name: '**Action**', value: `${'Lockdown'}` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) - .addField({ + .addFields({ name: '**Action**', value: `${'Lockdown'}` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) + .addFields({ name: `**Channel${channelsSuccessMap.size > 1 ? 's' : ''}**`, value: channelsSuccessMap .map((success, channel) => `<#${channel}> ${success ? util.emojis.success : util.emojis.error}`) diff --git a/src/listeners/guild-custom/bushUnlockdown.ts b/src/listeners/guild-custom/bushUnlockdown.ts index c7d9158..0de83d2 100644 --- a/src/listeners/guild-custom/bushUnlockdown.ts +++ b/src/listeners/guild-custom/bushUnlockdown.ts @@ -17,10 +17,10 @@ export default class BushUnlockdownListener extends BushListener { const logEmbed = new Embed() .setColor(util.colors.Blurple) .setTimestamp() - .addField({ name: '**Action**', value: `${'Unlockdown'}` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) - .addField({ + .addFields({ name: '**Action**', value: `${'Unlockdown'}` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) + .addFields({ name: `**Channel${channelsSuccessMap.size > 1 ? 's' : ''}**`, value: channelsSuccessMap .map((success, channel) => `<#${channel}> ${success ? util.emojis.success : util.emojis.error}`) diff --git a/src/listeners/member-custom/bushBan.ts b/src/listeners/member-custom/bushBan.ts index 12e8694..cd700a9 100644 --- a/src/listeners/member-custom/bushBan.ts +++ b/src/listeners/member-custom/bushBan.ts @@ -20,12 +20,12 @@ export default class BushBanListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${duration ? 'Temp Ban' : 'Perm Ban'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (duration) logEmbed.addField({ name: '**Duration**', value: util.humanizeDuration(duration) }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${duration ? 'Temp Ban' : 'Perm Ban'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (duration) logEmbed.addFields({ name: '**Duration**', value: util.humanizeDuration(duration) }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushBlock.ts b/src/listeners/member-custom/bushBlock.ts index e35b5a3..111c945 100644 --- a/src/listeners/member-custom/bushBlock.ts +++ b/src/listeners/member-custom/bushBlock.ts @@ -22,14 +22,14 @@ export default class BushBlockListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${duration ? 'Temp Block' : 'Perm Block'}` }) - .addField({ name: '**Channel**', value: `<#${channel.id}>` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${duration ? 'Temp Block' : 'Perm Block'}` }) + .addFields({ name: '**Channel**', value: `<#${channel.id}>` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (duration) logEmbed.addField({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + if (duration) logEmbed.addFields({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushKick.ts b/src/listeners/member-custom/bushKick.ts index 97db7e4..f3e5df1 100644 --- a/src/listeners/member-custom/bushKick.ts +++ b/src/listeners/member-custom/bushKick.ts @@ -20,11 +20,11 @@ export default class BushKickListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Kick'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Kick'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushMute.ts b/src/listeners/member-custom/bushMute.ts index 8b80658..6f05fcc 100644 --- a/src/listeners/member-custom/bushMute.ts +++ b/src/listeners/member-custom/bushMute.ts @@ -20,12 +20,12 @@ export default class BushMuteListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${duration ? 'Temp Mute' : 'Perm Mute'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (duration) logEmbed.addField({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${duration ? 'Temp Mute' : 'Perm Mute'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (duration) logEmbed.addFields({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushPunishRole.ts b/src/listeners/member-custom/bushPunishRole.ts index 1c9dcce..b3eeef0 100644 --- a/src/listeners/member-custom/bushPunishRole.ts +++ b/src/listeners/member-custom/bushPunishRole.ts @@ -20,11 +20,11 @@ export default class BushPunishRoleListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${duration ? 'Temp Punishment Role' : 'Perm Punishment Role'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (duration) logEmbed.addField({ name: '**Duration**', value: util.humanizeDuration(duration) }); + .addFields({ name: '**Action**', value: `${duration ? 'Temp Punishment Role' : 'Perm Punishment Role'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (duration) logEmbed.addFields({ name: '**Duration**', value: util.humanizeDuration(duration) }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushPunishRoleRemove.ts b/src/listeners/member-custom/bushPunishRoleRemove.ts index 5039370..22b17a7 100644 --- a/src/listeners/member-custom/bushPunishRoleRemove.ts +++ b/src/listeners/member-custom/bushPunishRoleRemove.ts @@ -20,11 +20,11 @@ export default class BushPunishRoleRemoveListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Remove Punishment Role'}` }) - .addField({ name: '**Role**', value: `${role}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${'Remove Punishment Role'}` }) + .addFields({ name: '**Role**', value: `${role}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); return await logChannel.send({ embeds: [logEmbed] }); } diff --git a/src/listeners/member-custom/bushPurge.ts b/src/listeners/member-custom/bushPurge.ts index 6f61fea..2834397 100644 --- a/src/listeners/member-custom/bushPurge.ts +++ b/src/listeners/member-custom/bushPurge.ts @@ -28,10 +28,10 @@ export default class BushPurgeListener extends BushListener { .setTimestamp() .setFooter({ text: `${messages.size.toLocaleString()} Messages` }) .setAuthor({ name: moderator.tag, iconURL: moderator.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Purge'}` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Channel**', value: `<#${channel.id}> (${channel.name})` }) - .addField({ + .addFields({ name: '**Action**', value: `${'Purge'}` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Channel**', value: `<#${channel.id}> (${channel.name})` }) + .addFields({ name: '**Messages**', value: `${ haste.url ? `[haste](${haste.url})${haste.error ? `- ${haste.error}` : ''}` : `${util.emojis.error} ${haste.error}` diff --git a/src/listeners/member-custom/bushRemoveTimeout.ts b/src/listeners/member-custom/bushRemoveTimeout.ts index bb6d463..f2a20ed 100644 --- a/src/listeners/member-custom/bushRemoveTimeout.ts +++ b/src/listeners/member-custom/bushRemoveTimeout.ts @@ -20,11 +20,11 @@ export default class BushRemoveTimeoutListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Remove Timeout'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Remove Timeout'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushTimeout.ts b/src/listeners/member-custom/bushTimeout.ts index 2887104..d0eedf2 100644 --- a/src/listeners/member-custom/bushTimeout.ts +++ b/src/listeners/member-custom/bushTimeout.ts @@ -22,12 +22,12 @@ export default class BushTimeoutListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Timeout'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) - .addField({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Timeout'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }) + .addFields({ name: '**Duration**', value: `${util.humanizeDuration(duration) || duration}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushUnban.ts b/src/listeners/member-custom/bushUnban.ts index a3bc7cf..a3370c8 100644 --- a/src/listeners/member-custom/bushUnban.ts +++ b/src/listeners/member-custom/bushUnban.ts @@ -20,11 +20,11 @@ export default class BushUnbanListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Unban'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Unban'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushUnblock.ts b/src/listeners/member-custom/bushUnblock.ts index fde3ad8..19d7fad 100644 --- a/src/listeners/member-custom/bushUnblock.ts +++ b/src/listeners/member-custom/bushUnblock.ts @@ -20,12 +20,12 @@ export default class BushUnblockListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Unblock'}` }) - .addField({ name: '**Channel**', value: `<#${channel.id}>` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Unblock'}` }) + .addFields({ name: '**Channel**', value: `<#${channel.id}>` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushUnmute.ts b/src/listeners/member-custom/bushUnmute.ts index ad9ae6e..791fa19 100644 --- a/src/listeners/member-custom/bushUnmute.ts +++ b/src/listeners/member-custom/bushUnmute.ts @@ -20,11 +20,11 @@ export default class BushUnmuteListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Unmute'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Unmute'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/member-custom/bushUpdateModlog.ts b/src/listeners/member-custom/bushUpdateModlog.ts index 05a5f8e..a8fb277 100644 --- a/src/listeners/member-custom/bushUpdateModlog.ts +++ b/src/listeners/member-custom/bushUpdateModlog.ts @@ -21,12 +21,12 @@ export default class BushUpdateModlogListener extends BushListener { name: moderator.user.tag, iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Update Modlog'}` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) - .addField({ name: '**ModLog Changed**', value: modlogID }) - .addField({ name: '**Value Changed**', value: key }) - .addField({ name: '**Old Value**', value: await util.inspectCleanRedactCodeblock(oldModlog, undefined, undefined, 1024) }) - .addField({ name: '**New Value**', value: await util.inspectCleanRedactCodeblock(newModlog, undefined, undefined, 1024) }); + .addFields({ name: '**Action**', value: `${'Update Modlog'}` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }) + .addFields({ name: '**ModLog Changed**', value: modlogID }) + .addFields({ name: '**Value Changed**', value: key }) + .addFields({ name: '**Old Value**', value: await util.inspectCleanRedactCodeblock(oldModlog, undefined, undefined, 1024) }) + .addFields({ name: '**New Value**', value: await util.inspectCleanRedactCodeblock(newModlog, undefined, undefined, 1024) }); return await logChannel.send({ embeds: [logEmbed] }); } diff --git a/src/listeners/member-custom/bushUpdateSettings.ts b/src/listeners/member-custom/bushUpdateSettings.ts index c4f71ff..1ce8806 100644 --- a/src/listeners/member-custom/bushUpdateSettings.ts +++ b/src/listeners/member-custom/bushUpdateSettings.ts @@ -21,12 +21,12 @@ export default class BushUpdateSettingsListener extends BushListener { name: moderator.user.tag, iconURL: moderator.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }); - logEmbed.addField({ name: '**Action**', value: `${'Update Settings'}` }); - if (moderator) logEmbed.addField({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }); + logEmbed.addFields({ name: '**Action**', value: `${'Update Settings'}` }); + if (moderator) logEmbed.addFields({ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` }); logEmbed - .addField({ name: '**Setting Changed**', value: setting }) - .addField({ name: '**Old Value**', value: await util.inspectCleanRedactCodeblock(oldSettings, 'js', undefined, 1024) }) - .addField({ name: '**New Value**', value: await util.inspectCleanRedactCodeblock(newSettings, 'js', undefined, 1024) }); + .addFields({ name: '**Setting Changed**', value: setting }) + .addFields({ name: '**Old Value**', value: await util.inspectCleanRedactCodeblock(oldSettings, 'js', undefined, 1024) }) + .addFields({ name: '**New Value**', value: await util.inspectCleanRedactCodeblock(newSettings, 'js', undefined, 1024) }); return await logChannel.send({ embeds: [logEmbed] }); } diff --git a/src/listeners/member-custom/bushWarn.ts b/src/listeners/member-custom/bushWarn.ts index 229438c..c22f61f 100644 --- a/src/listeners/member-custom/bushWarn.ts +++ b/src/listeners/member-custom/bushWarn.ts @@ -20,11 +20,11 @@ export default class BushWarnListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${caseID}` }) .setAuthor({ name: user.tag, iconURL: user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Warn'}` }) - .addField({ name: '**User**', value: `${user} (${user.tag})` }) - .addField({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) - .addField({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); - if (dmSuccess === false) logEmbed.addField({ name: '**Additional Info**', value: 'Could not dm user.' }); + .addFields({ name: '**Action**', value: `${'Warn'}` }) + .addFields({ name: '**User**', value: `${user} (${user.tag})` }) + .addFields({ name: '**Moderator**', value: `${moderator} (${moderator.tag})` }) + .addFields({ name: '**Reason**', value: `${reason ? reason : '[No Reason Provided]'}` }); + if (dmSuccess === false) logEmbed.addFields({ name: '**Additional Info**', value: 'Could not dm user.' }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/message/directMessage.ts b/src/listeners/message/directMessage.ts index c333e22..df4d578 100644 --- a/src/listeners/message/directMessage.ts +++ b/src/listeners/message/directMessage.ts @@ -37,7 +37,7 @@ export default class DirectMessageListener extends BushListener { if (message.attachments.filter((a) => typeof a.size == 'number').size == 1) { dmLogEmbed.setImage(message.attachments.filter((a) => typeof a.size == 'number').first()!.proxyURL); } else if (message.attachments.size > 0) { - dmLogEmbed.addField({ name: 'Attachments', value: message.attachments.map((a) => a.proxyURL).join('\n') }); + dmLogEmbed.addFields({ name: 'Attachments', value: message.attachments.map((a) => a.proxyURL).join('\n') }); } const dmChannel = await util.getConfigChannel('dm'); await dmChannel.send({ embeds: [dmLogEmbed] }); diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts index 16fa75d..7d77a76 100644 --- a/src/listeners/track-manual-punishments/modlogSyncBan.ts +++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts @@ -58,10 +58,10 @@ export default class ModlogSyncBanListener extends BushListener { name: ban.user.tag, iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Manual Ban'}` }) - .addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` }) - .addField({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) - .addField({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${'Manual Ban'}` }) + .addFields({ name: '**User**', value: `${ban.user} (${ban.user.tag})` }) + .addFields({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) + .addFields({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts index fa7a6dd..7841686 100644 --- a/src/listeners/track-manual-punishments/modlogSyncKick.ts +++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts @@ -58,10 +58,10 @@ export default class ModlogSyncKickListener extends BushListener { name: member.user.tag, iconURL: member.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Manual Kick'}` }) - .addField({ name: '**User**', value: `${member.user} (${member.user.tag})` }) - .addField({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) - .addField({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${'Manual Kick'}` }) + .addFields({ name: '**User**', value: `${member.user} (${member.user.tag})` }) + .addFields({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) + .addFields({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts index 4d7f901..8a2c486 100644 --- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts +++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts @@ -63,10 +63,10 @@ export default class ModlogSyncTimeoutListener extends BushListener { name: newMember.user.tag, iconURL: newMember.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${newTime ? 'Manual Timeout' : 'Manual Remove Timeout'}` }) - .addField({ name: '**User**', value: `${newMember.user} (${newMember.user.tag})` }) - .addField({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) - .addField({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${newTime ? 'Manual Timeout' : 'Manual Remove Timeout'}` }) + .addFields({ name: '**User**', value: `${newMember.user} (${newMember.user.tag})` }) + .addFields({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) + .addFields({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts index 680b965..70c7ba8 100644 --- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts +++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts @@ -57,10 +57,10 @@ export default class ModlogSyncUnbanListener extends BushListener { name: ban.user.tag, iconURL: ban.user.avatarURL({ extension: 'png', size: 4096 }) ?? undefined }) - .addField({ name: '**Action**', value: `${'Manual Unban'}` }) - .addField({ name: '**User**', value: `${ban.user} (${ban.user.tag})` }) - .addField({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) - .addField({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); + .addFields({ name: '**Action**', value: `${'Manual Unban'}` }) + .addFields({ name: '**User**', value: `${ban.user} (${ban.user.tag})` }) + .addFields({ name: '**Moderator**', value: `${first.executor} (${first.executor.tag})` }) + .addFields({ name: '**Reason**', value: `${first.reason ? first.reason : '[No Reason Provided]'}` }); return await logChannel.send({ embeds: [logEmbed] }); } } diff --git a/src/listeners/ws/INTERACTION_CREATE.ts b/src/listeners/ws/INTERACTION_CREATE.ts index 1c79406..c245418 100644 --- a/src/listeners/ws/INTERACTION_CREATE.ts +++ b/src/listeners/ws/INTERACTION_CREATE.ts @@ -198,15 +198,15 @@ export default class WsInteractionCreateListener extends BushListener { .setTimestamp() .setFooter({ text: `CaseID: ${modlogCase}` }) .setAuthor({ name: user.tag, iconURL: user.displayAvatarURL() }) - .addField({ + .addFields({ name: `Why were you ${Moderation.punishmentToPastTense(punishment)}?`, value: interaction.data.components![0].components[0]!.value.substring(0, 1024) }) - .addField({ + .addFields({ name: 'Do you believe it was fair?', value: interaction.data.components![1].components[0]!.value.substring(0, 1024) }) - .addField({ + .addFields({ name: `Why should your ${punishment} be removed?`, value: interaction.data.components![2].components[0]!.value.substring(0, 1024) }) |