fixing eslint
diff --git a/src/commands/server/buttons.ts b/src/commands/server/buttons.ts
index bc90983..61db825 100644
--- a/src/commands/server/buttons.ts
+++ b/src/commands/server/buttons.ts
@@ -44,7 +44,7 @@
});
let closed = false;
- let data: Data = {
+ const data: Data = {
buttons: [],
title: null,
description: null,
@@ -201,9 +201,9 @@
}
case "send": {
await i.deferUpdate();
- let channel = interaction.guild!.channels.cache.get(data.channel!) as Discord.TextChannel;
- let components = new ActionRowBuilder<ButtonBuilder>();
- for(let button of data.buttons) {
+ const channel = interaction.guild!.channels.cache.get(data.channel!) as Discord.TextChannel;
+ const components = new ActionRowBuilder<ButtonBuilder>();
+ for(const button of data.buttons) {
components.addComponents(
new ButtonBuilder()
.setCustomId(button)
@@ -211,9 +211,9 @@
.setStyle(ButtonStyle.Primary)
);
}
- let messageData: MessageCreateOptions = {components: [components]}
+ const messageData: MessageCreateOptions = {components: [components]}
if (data.title || data.description) {
- let e = new EmojiEmbed()
+ const e = new EmojiEmbed()
if(data.title) e.setTitle(data.title);
if(data.description) e.setDescription(data.description);
if(data.color) e.setColor(data.color);
@@ -224,7 +224,7 @@
}
}
} else if(i.isStringSelectMenu()) {
- try {await i.deferUpdate();} catch (err) {}
+ try {await i.deferUpdate();} catch (err) {console.log(err)}
switch(i.customId) {
case "color": {
data.color = colors[i.values[0]!]!;