defect/214-application-did-not-respond (#233)
Co-authored-by: Ethan Lane <ethan@vylpes.com> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/233
This commit is contained in:
parent
29a4a596f7
commit
a3e062a1ff
1 changed files with 16 additions and 3 deletions
|
@ -33,6 +33,11 @@ export default class Rules extends Command {
|
||||||
|
|
||||||
const embeds: EmbedBuilder[] = [];
|
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 => {
|
rules.forEach(rule => {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(EmbedColours.Ok)
|
.setColor(EmbedColours.Ok)
|
||||||
|
@ -53,9 +58,17 @@ export default class Rules extends Command {
|
||||||
const channel = interaction.channel;
|
const channel = interaction.channel;
|
||||||
|
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
|
await interaction.reply({ content: "Channel not found.", ephemeral: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await channel.send({ embeds: embeds });
|
await channel.send({ embeds: embeds });
|
||||||
|
|
||||||
|
const successEmbed = new EmbedBuilder()
|
||||||
|
.setColor(EmbedColours.Ok)
|
||||||
|
.setTitle("Success")
|
||||||
|
.setDescription("The rules have sent to this channel successfully");
|
||||||
|
|
||||||
|
await interaction.reply({ embeds: [ successEmbed ], ephemeral: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue