diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-05-24 18:29:57 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-05-24 18:29:57 -0400 |
commit | 9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c (patch) | |
tree | 4b95a06ff6991207ab8b8e93f0bca26e24a97f80 /src/commands/moulberry-bush | |
parent | 6b8115ab1ec94d4330019fc7a93e094d9d64c48e (diff) | |
download | tanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.tar.gz tanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.tar.bz2 tanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.zip |
fix: breaking changes
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r-- | src/commands/moulberry-bush/report.ts | 42 | ||||
-rw-r--r-- | src/commands/moulberry-bush/rule.ts | 5 | ||||
-rw-r--r-- | src/commands/moulberry-bush/serverStatus.ts | 14 |
3 files changed, 33 insertions, 28 deletions
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index 4d57fcd..f8f6371 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -71,32 +71,34 @@ export default class ReportCommand extends BushCommand { .setTitle('New Report') .setColor(util.colors.red) .setDescription(evidence) - .addFields({ - name: 'Reporter', - value: [ - `**Name:**${message.author.tag} <@${message.author.id}>`, - `**Joined:** $${util.timestampAndDelta(message.member!.joinedAt!)}`, - `**Created:** ${util.timestampAndDelta(message.author.createdAt)}`, - `**Sent From**: <#${message.channel.id}> [Jump to context](${message.url})` - ].join('\n'), - inline: true - }) - .addFields({ - name: 'Reported User', - value: [ - `**Name:**${member.user.tag} <@${member.user.id}>`, - `**Joined:** $${util.timestampAndDelta(member.joinedAt!)}`, - `**Created:** ${util.timestampAndDelta(member.user.createdAt)}` - ].join('\n'), - inline: true - }); + .addFields([ + { + name: 'Reporter', + value: [ + `**Name:**${message.author.tag} <@${message.author.id}>`, + `**Joined:** $${util.timestampAndDelta(message.member!.joinedAt!)}`, + `**Created:** ${util.timestampAndDelta(message.author.createdAt)}`, + `**Sent From**: <#${message.channel.id}> [Jump to context](${message.url})` + ].join('\n'), + inline: true + }, + { + name: 'Reported User', + value: [ + `**Name:**${member.user.tag} <@${member.user.id}>`, + `**Joined:** $${util.timestampAndDelta(member.joinedAt!)}`, + `**Created:** ${util.timestampAndDelta(member.user.createdAt)}` + ].join('\n'), + inline: true + } + ]); if (message.attachments.size > 0) { const fileName = message.attachments.first()!.name!.toLowerCase(); if (fileName.endsWith('.png') || fileName.endsWith('.jpg') || fileName.endsWith('.gif') || fileName.endsWith('.webp')) { reportEmbed.setImage(message.attachments.first()!.url); } else { - reportEmbed.addFields({ name: 'Attachment', value: message.attachments.first()!.url }); + reportEmbed.addFields([{ name: 'Attachment', value: message.attachments.first()!.url }]); } } await reportChannel.send({ embeds: [reportEmbed] }).then(async (ReportMessage) => { diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts index ca0bba0..31f59d7 100644 --- a/src/commands/moulberry-bush/rule.ts +++ b/src/commands/moulberry-bush/rule.ts @@ -108,10 +108,11 @@ export default class RuleCommand extends BushCommand { } if (rule) { if (rules[rule - 1]?.title && rules[rule - 1]?.description) - rulesEmbed.addFields({ name: rules[rule - 1].title, value: rules[rule - 1].description }); + rulesEmbed.addFields([{ name: rules[rule - 1].title, value: rules[rule - 1].description }]); } else { for (let i = 0; i < rules.length; i++) { - if (rules[i]?.title && rules[i]?.description) rulesEmbed.addFields({ name: rules[i].title, value: rules[i].description }); + if (rules[i]?.title && rules[i]?.description) + rulesEmbed.addFields([{ name: rules[i].title, value: rules[i].description }]); } } await message.util.send({ diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts index 5e9184a..c0df828 100644 --- a/src/commands/moulberry-bush/serverStatus.ts +++ b/src/commands/moulberry-bush/serverStatus.ts @@ -38,7 +38,7 @@ export default class ServerStatusCommand extends BushCommand { await message.util.edit({ embeds: [ msgEmbed - .addFields({ name: 'Status', value: 'The server is online, all features related to prices will likely work.' }) + .addFields([{ name: 'Status', value: 'The server is online, all features related to prices will likely work.' }]) .setColor(util.colors.success) ] }); @@ -46,11 +46,13 @@ export default class ServerStatusCommand extends BushCommand { await message.util.edit({ embeds: [ msgEmbed - .addFields({ - name: 'Status', - value: - "It appears Moulberry's server is offline, this means that everything related to prices will likely not work." - }) + .addFields([ + { + name: 'Status', + value: + "It appears Moulberry's server is offline, this means that everything related to prices will likely not work." + } + ]) .setColor(util.colors.error) ] }); |