fixing eslint
diff --git a/src/premium/createTranscript.ts b/src/premium/createTranscript.ts
index 111f1a0..fb6dde7 100644
--- a/src/premium/createTranscript.ts
+++ b/src/premium/createTranscript.ts
@@ -112,9 +112,9 @@
}
});
- let interactionMember = await interaction.guild?.members.fetch(interaction.user.id)
+ const interactionMember = await interaction.guild?.members.fetch(interaction.user.id)
- let newOut: Transcript = {
+ const newOut: Transcript = {
type: "ticket",
guild: interaction.guild!.id,
channel: interaction.channel!.id,
@@ -131,7 +131,7 @@
}
if(interactionMember?.roles.icon) newOut.createdBy.topRole.badgeURL = interactionMember.roles.icon.iconURL()!;
messages.reverse().forEach((message) => {
- let msg: TranscriptMessage = {
+ const msg: TranscriptMessage = {
id: message.id,
author: {
username: message.author.username,
@@ -146,7 +146,7 @@
if (message.member!.roles.icon) msg.author.topRole.badgeURL = message.member!.roles.icon.iconURL()!;
if (message.content) msg.content = message.content;
if (message.embeds.length > 0) msg.embeds = message.embeds.map(embed => {
- let obj: TranscriptEmbed = {};
+ const obj: TranscriptEmbed = {};
if (embed.title) obj.title = embed.title;
if (embed.description) obj.description = embed.description;
if (embed.fields.length > 0) obj.fields = embed.fields.map(field => {
@@ -163,7 +163,7 @@
return obj;
});
if (message.components.length > 0) msg.components = message.components.map(component => component.components.map(child => {
- let obj: TranscriptComponent = {
+ const obj: TranscriptComponent = {
type: child.type
}
if (child.type === ComponentType.Button) {
@@ -175,7 +175,7 @@
return obj
}));
if (message.editedTimestamp) msg.editedTimestamp = message.editedTimestamp;
- if (message.flags) msg.flags = message.flags.toArray();
+ msg.flags = message.flags.toArray();
if (message.stickers.size > 0) msg.stickerURLs = message.stickers.map(sticker => sticker.url);
if (message.reference) msg.referencedMessage = [message.reference.guildId ?? "", message.reference.channelId, message.reference.messageId ?? ""];