From 6b77527fa2775eb0fc099fa20c06774024f0e7e5 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 20 Dec 2022 17:56:56 +0000 Subject: [PATCH] Update changes requested --- src/commands/rules.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/rules.ts b/src/commands/rules.ts index ce38a06..930138c 100644 --- a/src/commands/rules.ts +++ b/src/commands/rules.ts @@ -33,6 +33,11 @@ export default class Rules extends Command { const embeds: EmbedBuilder[] = []; + if (rules.length == 0) { + await interaction.reply({ content: "No rules have been supplied within code base for this server.", ephemeral: true }); + return; + } + rules.forEach(rule => { const embed = new EmbedBuilder() .setColor(EmbedColours.Ok) @@ -53,6 +58,7 @@ export default class Rules extends Command { const channel = interaction.channel; if (!channel) { + await interaction.reply({ content: "Channel not found.", ephemeral: true }); return; } @@ -63,6 +69,6 @@ export default class Rules extends Command { .setTitle("Success") .setDescription("The rules have sent to this channel successfully"); - await interaction.reply({ embeds: [ successEmbed], ephemeral: true }); + await interaction.reply({ embeds: [ successEmbed ], ephemeral: true }); } } \ No newline at end of file