refactor(arabot): change addField to addFields

This commit is contained in:
smyalygames 2022-11-05 23:55:29 +00:00
parent 275da768dd
commit 4f8cec5331

View File

@ -228,10 +228,10 @@ class SusCommand extends Command {
mod = modGuildMember!.displayName; mod = modGuildMember!.displayName;
} }
// Add sus note to embed // Add sus note to embed
noteEmbed.addField( noteEmbed.addFields({
`Sus ID: ${notes[i].id} | Moderator: ${mod} | Date: <t:${Math.floor(notes[i].time.getTime() / 1000)}>`, name: `Sus ID: ${notes[i].id} | Moderator: ${mod} | Date: <t:${Math.floor(notes[i].time.getTime() / 1000)}>`,
notes[i].note, value: notes[i].note,
); });
} }
// Sends the notes to the user // Sends the notes to the user
@ -301,10 +301,10 @@ class SusCommand extends Command {
.setColor('#ff0000') .setColor('#ff0000')
.setTitle(`Sus note for ${userName}`) .setTitle(`Sus note for ${userName}`)
.setThumbnail(user.avatarURL()!) // TODO avatar does not show when run .setThumbnail(user.avatarURL()!) // TODO avatar does not show when run
.addField( .addFields({
`ID: ${noteId} | Moderator: ${modName} | Date: <t:${Math.floor(note.time.getTime() / 1000)}>`, name: `ID: ${noteId} | Moderator: ${modName} | Date: <t:${Math.floor(note.time.getTime() / 1000)}>`,
note.note, value: note.note,
); });
// Create buttons to delete or cancel the deletion // Create buttons to delete or cancel the deletion
const buttons = new MessageActionRow<MessageButton>() const buttons = new MessageActionRow<MessageButton>()
@ -423,10 +423,10 @@ class SusCommand extends Command {
mod = modGuildMember.displayName; mod = modGuildMember.displayName;
} }
// Add sus note to embed // Add sus note to embed
noteEmbed.addField( noteEmbed.addFields({
`Sus ID: ${notes[i].id} | Moderator: ${mod} | Date: <t:${Math.floor(notes[i].time.getTime() / 1000)}>`, name: `Sus ID: ${notes[i].id} | Moderator: ${mod} | Date: <t:${Math.floor(notes[i].time.getTime() / 1000)}>`,
notes[i].note, value: notes[i].note,
); });
} }
// Create buttons to delete or cancel the deletion // Create buttons to delete or cancel the deletion