aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/decode.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/utilities/decode.ts')
-rw-r--r--src/commands/utilities/decode.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/commands/utilities/decode.ts b/src/commands/utilities/decode.ts
index 6aabeac..065e9e5 100644
--- a/src/commands/utilities/decode.ts
+++ b/src/commands/utilities/decode.ts
@@ -63,19 +63,17 @@ export default class DecodeCommand extends BushCommand {
const encodeOrDecode = capitalize(message?.util?.parsed?.alias ?? 'decoded');
const decodedEmbed = new EmbedBuilder()
.setTitle(`${encodeOrDecode} Information`)
- .addFields([{ name: '📥 Input', value: await this.client.utils.inspectCleanRedactCodeblock(data) }]);
+ .addFields({ name: '📥 Input', value: await this.client.utils.inspectCleanRedactCodeblock(data) });
try {
const decoded = Buffer.from(data, from).toString(to);
decodedEmbed
.setColor(colors.success)
- .addFields([{ name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(decoded) }]);
+ .addFields({ name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(decoded) });
} catch (error) {
- decodedEmbed.setColor(colors.error).addFields([
- {
- name: `📤 Error ${encodeOrDecode.slice(1)}ing`,
- value: await this.client.utils.inspectCleanRedactCodeblock(formatError(error))
- }
- ]);
+ decodedEmbed.setColor(colors.error).addFields({
+ name: `📤 Error ${encodeOrDecode.slice(1)}ing`,
+ value: await this.client.utils.inspectCleanRedactCodeblock(formatError(error))
+ });
}
return await message.util.reply({ embeds: [decodedEmbed], allowedMentions: AllowedMentions.none() });
}