aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
commit22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b (patch)
treeab7f68cb9168d2b06ba144b48311370059cf5fac /src/commands/moulberry-bush
parent544f94704c9dd37913de11eab67cd594d17fcd87 (diff)
downloadtanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.gz
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.bz2
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.zip
remove array from add*(...)
Diffstat (limited to 'src/commands/moulberry-bush')
-rw-r--r--src/commands/moulberry-bush/report.ts6
-rw-r--r--src/commands/moulberry-bush/rule.ts5
-rw-r--r--src/commands/moulberry-bush/serverStatus.ts14
3 files changed, 11 insertions, 14 deletions
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts
index 47e45f9..13ef2b6 100644
--- a/src/commands/moulberry-bush/report.ts
+++ b/src/commands/moulberry-bush/report.ts
@@ -79,7 +79,7 @@ export default class ReportCommand extends BushCommand {
.setTitle('New Report')
.setColor(colors.red)
.setDescription(evidence)
- .addFields([
+ .addFields(
{
name: 'Reporter',
value: stripIndent`
@@ -97,14 +97,14 @@ export default class ReportCommand extends BushCommand {
**Created:** ${timestampAndDelta(member.user.createdAt)}`,
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 574334a..d58b78e 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -123,11 +123,10 @@ 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 c0c0518..a4d5e45 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(colors.success)
]
});
@@ -46,13 +46,11 @@ 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(colors.error)
]
});