defect/214-application-did-not-respond #233

Merged
Vylpes merged 2 commits from defect/214-application-did-not-respond into develop 2022-12-27 15:18:56 +00:00
Showing only changes of commit c4b5d9671b - Show all commits

View file

@ -32,13 +32,13 @@ export default class Rules extends Command {
const rules = JSON.parse(rulesFile) as IRules[];
const embeds: EmbedBuilder[] = [];
rules.forEach(rule => {
const embed = new EmbedBuilder()
.setColor(EmbedColours.Ok)
.setTitle(rule.title || "Rules")
.setDescription(rule.description ? rule.description.join("\n") : "*none*");
if (rule.image) {
embed.setImage(rule.image);
}
@ -55,7 +55,14 @@ export default class Rules extends Command {
if (!channel) {
return;
}
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 });
}
}