not at all
diff --git a/src/commands/nucleus/premium.ts b/src/commands/nucleus/premium.ts
index 2f20d2e..e0d8d8d 100644
--- a/src/commands/nucleus/premium.ts
+++ b/src/commands/nucleus/premium.ts
@@ -9,7 +9,7 @@
const callback = async (interaction: CommandInteraction): Promise<void> => {
await interaction.reply({embeds: LoadingEmbed, ephemeral: true})
- const member = await (await interaction.client.guilds.fetch("684492926528651336")).members.fetch(interaction.user.id)
+ const member = (await interaction.client.guilds.fetch("684492926528651336")).members.cache.get(interaction.user.id)
const firstDescription = "\n\nPremium allows your server to get access to extra features, for a fixed price per month.\nThis includes:\n" +
"- Attachment logs - Stores attachments so they can be viewed after a message is deleted.\n" +
"- Ticket Transcripts - Gives a link to view the history of a ticket after it has been closed.\n"
diff --git a/src/commands/settings/tracks.ts b/src/commands/settings/tracks.ts
index 612d069..8d2d59d 100644
--- a/src/commands/settings/tracks.ts
+++ b/src/commands/settings/tracks.ts
@@ -152,7 +152,7 @@
let closed = false;
do {
const editableRoles: string[] = current.track.map((r) => {
- if(!(roles.get(r)!.position >= (interaction.member as GuildMember).roles.highest.position)) return roles.get(r)!.name;
+ if(!(roles.get(r)!.position >= (interaction.member as GuildMember).roles.highest.position) || interaction.user.id === interaction.guild?.ownerId) return roles.get(r)!.name;
}).filter(v => v !== undefined) as string[];
const selectMenu = new ActionRowBuilder<StringSelectMenuBuilder>()
.addComponents(
@@ -217,7 +217,10 @@
)
.setStatus("Success")
- interaction.editReply({embeds: [embed], components: [roleSelect, selectMenu, buttons]});
+ let comps: ActionRowBuilder<RoleSelectMenuBuilder | ButtonBuilder | StringSelectMenuBuilder>[] = [roleSelect, buttons];
+ if(current.track.length >= 1) comps.splice(1, 0, selectMenu);
+
+ interaction.editReply({embeds: [embed], components: comps});
let out: ButtonInteraction | RoleSelectMenuInteraction | StringSelectMenuInteraction | null;
@@ -233,9 +236,9 @@
if(!out) return;
if (out.isButton()) {
- out.deferUpdate();
switch(out.customId) {
case "back": {
+ out.deferUpdate();
closed = true;
break;
}
@@ -244,14 +247,17 @@
break;
}
case "reorder": {
+ out.deferUpdate();
current.track = (await reorderTracks(out, message, roles, current.track))!;
break;
}
case "retainPrevious": {
+ out.deferUpdate();
current.retainPrevious = !current.retainPrevious;
break;
}
case "nullable": {
+ out.deferUpdate();
current.nullable = !current.nullable;
break;
}
@@ -271,8 +277,9 @@
const role = out.values![0]!;
if(!current.track.includes(role)) {
current.track.push(role);
+ } else {
+ out.reply({content: "That role is already on this track", ephemeral: true})
}
- out.reply({content: "That role is already on this track", ephemeral: true})
break;
}
}
@@ -330,7 +337,7 @@
.setCustomId("next")
.setEmoji(getEmojiByName("CONTROL.RIGHT", "id") as APIMessageComponentEmoji)
.setStyle(ButtonStyle.Primary)
- .setDisabled(page === Object.keys(tracks).length - 1),
+ .setDisabled(page === tracks.length - 1),
new ButtonBuilder()
.setCustomId("add")
.setLabel("New Track")