fixed guide, added feedback to user/about, fixed bugs on slowmode and softban
diff --git a/src/commands/user/about.ts b/src/commands/user/about.ts
index b78f458..bdd73c4 100644
--- a/src/commands/user/about.ts
+++ b/src/commands/user/about.ts
@@ -160,6 +160,7 @@
let m
m = await interaction.reply({embeds: [new generateEmojiEmbed().setTitle("Loading").setEmoji("NUCLEUS.LOADING").setStatus("Danger")], fetchReply: true, ephemeral: true});
let page = 0
+ let breakReason = ""
while (true) {
let em = new Discord.MessageEmbed(embeds[page].embed)
em.setDescription(em.description + "\n" + createPageIndicator(embeds.length, page));
@@ -209,7 +210,7 @@
let i
try {
i = await m.awaitMessageComponent({time: 600000});
- } catch { break }
+ } catch { breakReason = "Message timed out"; break }
i.deferUpdate()
if (i.component.customId == "left") {
if (page > 0) page--;
@@ -220,15 +221,19 @@
} else if (i.component.customId == "select") {
selectPaneOpen = !selectPaneOpen;
} else if (i.component.customId == "close") {
+ breakReason = "Message closed";
break;
} else if (i.component.customId == "page") {
page = parseInt(i.values[0]);
selectPaneOpen = false;
} else {
+ breakReason = "Message closed";
break;
}
}
- await interaction.editReply({embeds: [m.embeds[0]], components: [new MessageActionRow().addComponents([
+ let em = new Discord.MessageEmbed(embeds[page].embed)
+ em.setDescription(em.description + "\n" + createPageIndicator(embeds.length, page) + " | " + breakReason);
+ await interaction.editReply({embeds: [em], components: [new MessageActionRow().addComponents([
new MessageButton()
.setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
.setStyle("SECONDARY")
@@ -247,7 +252,7 @@
new MessageButton()
.setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
.setCustomId("close")
- .setStyle("PRIMARY")
+ .setStyle("DANGER")
.setDisabled(true)
])]})
}