Skyler Grey | f21323a | 2022-08-13 23:58:22 +0100 | [diff] [blame] | 1 | import { |
| 2 | CommandInteraction, |
| 3 | GuildMember, |
| 4 | Message, |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 5 | ActionRowBuilder, |
| 6 | ButtonBuilder, |
Skyler Grey | f21323a | 2022-08-13 23:58:22 +0100 | [diff] [blame] | 7 | MessageComponentInteraction, |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 8 | TextChannel, |
PineaFan | 538d375 | 2023-01-12 21:48:23 +0000 | [diff] [blame] | 9 | ButtonStyle, |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 10 | User, |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 11 | ComponentType, |
| 12 | ThreadChannel |
Skyler Grey | f21323a | 2022-08-13 23:58:22 +0100 | [diff] [blame] | 13 | } from "discord.js"; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 14 | import EmojiEmbed from "../utils/generateEmojiEmbed.js"; |
| 15 | import getEmojiByName from "../utils/getEmojiByName.js"; |
| 16 | import { PasteClient, Publicity, ExpireDate } from "pastebin-api"; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 17 | import client from "../utils/client.js"; |
TheCodedProf | 94ff6de | 2023-02-22 17:47:26 -0500 | [diff] [blame] | 18 | import { messageException } from '../utils/createTemporaryStorage.js'; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 19 | |
PineaFan | 752af46 | 2022-12-31 21:59:38 +0000 | [diff] [blame] | 20 | const pbClient = new PasteClient(client.config.pastebinApiKey); |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 21 | |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 22 | interface TranscriptEmbed { |
| 23 | title?: string; |
| 24 | description?: string; |
| 25 | fields?: { |
| 26 | name: string; |
| 27 | value: string; |
| 28 | inline: boolean; |
| 29 | }[]; |
| 30 | footer?: { |
| 31 | text: string; |
| 32 | iconURL?: string; |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | interface TranscriptComponent { |
| 37 | type: number; |
| 38 | style?: ButtonStyle; |
| 39 | label?: string; |
| 40 | description?: string; |
| 41 | placeholder?: string; |
| 42 | emojiURL?: string; |
| 43 | } |
| 44 | |
| 45 | interface TranscriptAuthor { |
| 46 | username: string; |
| 47 | discriminator: number; |
| 48 | nickname?: string; |
| 49 | id: string; |
| 50 | iconURL?: string; |
| 51 | topRole: { |
| 52 | color: number; |
| 53 | badgeURL?: string; |
| 54 | } |
| 55 | } |
| 56 | |
TheCodedProf | 1f67504 | 2023-02-16 17:01:29 -0500 | [diff] [blame] | 57 | interface TranscriptAttachment { |
| 58 | url: string; |
| 59 | filename: string; |
| 60 | size: number; |
| 61 | log?: string; |
| 62 | } |
| 63 | |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 64 | interface TranscriptMessage { |
| 65 | id: string; |
| 66 | author: TranscriptAuthor; |
| 67 | content?: string; |
| 68 | embeds?: TranscriptEmbed[]; |
| 69 | components?: TranscriptComponent[][]; |
| 70 | editedTimestamp?: number; |
| 71 | createdTimestamp: number; |
| 72 | flags?: string[]; |
TheCodedProf | 1f67504 | 2023-02-16 17:01:29 -0500 | [diff] [blame] | 73 | attachments?: TranscriptAttachment[]; |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 74 | stickerURLs?: string[]; |
| 75 | referencedMessage?: string | [string, string, string]; |
| 76 | } |
| 77 | |
| 78 | interface Transcript { |
| 79 | type: "ticket" | "purge" |
| 80 | guild: string; |
| 81 | channel: string; |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 82 | for: TranscriptAuthor |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 83 | messages: TranscriptMessage[]; |
| 84 | createdTimestamp: number; |
| 85 | createdBy: TranscriptAuthor; |
| 86 | } |
| 87 | |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 88 | const noTopic = new EmojiEmbed() |
| 89 | .setTitle("User not found") |
| 90 | .setDescription("There is no user associated with this ticket.") |
| 91 | .setStatus("Danger") |
| 92 | .setEmoji("CONTROL.BLOCKCROSS") |
| 93 | |
pineafan | 0f5cc78 | 2022-08-12 21:55:42 +0100 | [diff] [blame] | 94 | export default async function (interaction: CommandInteraction | MessageComponentInteraction) { |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 95 | if (interaction.channel === null) return; |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 96 | if (!(interaction.channel instanceof TextChannel || interaction.channel instanceof ThreadChannel)) return; |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 97 | const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 98 | |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 99 | let messages: Message[] = []; |
| 100 | let deletedCount: number; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 101 | |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 102 | do { |
| 103 | const fetched = await (interaction.channel as TextChannel).messages.fetch({ limit: 100 }); |
| 104 | const deleted = await (interaction.channel as TextChannel).bulkDelete(fetched, true); |
| 105 | deletedCount = deleted.size; |
TheCodedProf | bc94a5c | 2023-01-18 18:59:31 -0500 | [diff] [blame] | 106 | messages = messages.concat(Array.from(deleted.values() as Iterable<Message>)); |
TheCodedProf | 94ff6de | 2023-02-22 17:47:26 -0500 | [diff] [blame] | 107 | if (messages.length === 1) messageException(interaction.guild!.id, interaction.channel.id, messages[0]!.id) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 108 | } while (deletedCount === 100); |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 109 | messages = messages.filter(message => !( |
| 110 | message.components.some( |
| 111 | component => component.components.some( |
| 112 | child => child.customId?.includes("transcript") ?? false |
| 113 | ) |
| 114 | ) |
| 115 | )); |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 116 | |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 117 | let out = ""; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 118 | messages.reverse().forEach((message) => { |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 119 | if (!message.author.bot) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 120 | const sentDate = new Date(message.createdTimestamp); |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 121 | out += `${message.author.username}#${message.author.discriminator} (${ |
| 122 | message.author.id |
| 123 | }) [${sentDate.toUTCString()}]\n`; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 124 | const lines = message.content.split("\n"); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 125 | lines.forEach((line) => { |
| 126 | out += `> ${line}\n`; |
| 127 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 128 | out += "\n\n"; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 129 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 130 | }); |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 131 | |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 132 | const interactionMember = await interaction.guild?.members.fetch(interaction.user.id) |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 133 | |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 134 | let topic |
| 135 | let member: GuildMember | null = null; |
| 136 | if (interaction.channel instanceof TextChannel) { |
| 137 | topic = interaction.channel.topic; |
| 138 | if (topic === null) return await interaction.reply({ embeds: [noTopic] }); |
| 139 | member = interaction.guild!.members.cache.get(topic.split(" ")[1]!) ?? null; |
| 140 | } else { |
| 141 | topic = interaction.channel.name; |
| 142 | const split = topic.split("-").map(p => p.trim()) as [string, string, string]; |
| 143 | member = interaction.guild!.members.cache.get(split[1]) ?? null; |
| 144 | if (member === null) return await interaction.reply({ embeds: [noTopic] }); |
| 145 | } |
| 146 | |
| 147 | |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 148 | const newOut: Transcript = { |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 149 | type: "ticket", |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 150 | for: { |
| 151 | username: member!.user.username, |
| 152 | discriminator: parseInt(member!.user.discriminator), |
| 153 | id: member!.user.id, |
| 154 | topRole: { |
| 155 | color: member!.roles.highest.color |
| 156 | } |
| 157 | }, |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 158 | guild: interaction.guild!.id, |
| 159 | channel: interaction.channel!.id, |
| 160 | messages: [], |
| 161 | createdTimestamp: Date.now(), |
| 162 | createdBy: { |
| 163 | username: interaction.user.username, |
| 164 | discriminator: parseInt(interaction.user.discriminator), |
| 165 | id: interaction.user.id, |
| 166 | topRole: { |
| 167 | color: interactionMember?.roles.highest.color ?? 0x000000 |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | if(interactionMember?.roles.icon) newOut.createdBy.topRole.badgeURL = interactionMember.roles.icon.iconURL()!; |
| 172 | messages.reverse().forEach((message) => { |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 173 | const msg: TranscriptMessage = { |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 174 | id: message.id, |
| 175 | author: { |
| 176 | username: message.author.username, |
| 177 | discriminator: parseInt(message.author.discriminator), |
| 178 | id: message.author.id, |
| 179 | topRole: { |
| 180 | color: message.member!.roles.highest.color |
| 181 | } |
| 182 | }, |
| 183 | createdTimestamp: message.createdTimestamp |
| 184 | }; |
| 185 | if (message.member!.roles.icon) msg.author.topRole.badgeURL = message.member!.roles.icon.iconURL()!; |
| 186 | if (message.content) msg.content = message.content; |
| 187 | if (message.embeds.length > 0) msg.embeds = message.embeds.map(embed => { |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 188 | const obj: TranscriptEmbed = {}; |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 189 | if (embed.title) obj.title = embed.title; |
| 190 | if (embed.description) obj.description = embed.description; |
| 191 | if (embed.fields.length > 0) obj.fields = embed.fields.map(field => { |
| 192 | return { |
| 193 | name: field.name, |
| 194 | value: field.value, |
| 195 | inline: field.inline ?? false |
| 196 | } |
| 197 | }); |
| 198 | if (embed.footer) obj.footer = { |
| 199 | text: embed.footer.text, |
| 200 | }; |
| 201 | if (embed.footer?.iconURL) obj.footer!.iconURL = embed.footer.iconURL; |
| 202 | return obj; |
| 203 | }); |
| 204 | if (message.components.length > 0) msg.components = message.components.map(component => component.components.map(child => { |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 205 | const obj: TranscriptComponent = { |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 206 | type: child.type |
| 207 | } |
| 208 | if (child.type === ComponentType.Button) { |
| 209 | obj.style = child.style; |
| 210 | obj.label = child.label ?? ""; |
TheCodedProf | 362c51d | 2023-02-14 16:31:33 -0500 | [diff] [blame] | 211 | } else if (child.type > 2) { |
| 212 | obj.placeholder = child.placeholder ?? ""; |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 213 | } |
| 214 | return obj |
| 215 | })); |
| 216 | if (message.editedTimestamp) msg.editedTimestamp = message.editedTimestamp; |
TheCodedProf | 1807fb3 | 2023-02-20 14:33:48 -0500 | [diff] [blame] | 217 | msg.flags = message.flags.toArray(); |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 218 | |
| 219 | if (message.stickers.size > 0) msg.stickerURLs = message.stickers.map(sticker => sticker.url); |
| 220 | if (message.reference) msg.referencedMessage = [message.reference.guildId ?? "", message.reference.channelId, message.reference.messageId ?? ""]; |
TheCodedProf | aa3fe99 | 2023-02-25 21:53:09 -0500 | [diff] [blame] | 221 | newOut.messages.push(msg); |
TheCodedProf | 2e54a77 | 2023-02-14 16:26:47 -0500 | [diff] [blame] | 222 | }); |
| 223 | |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 224 | const code = await client.database.transcripts.create(newOut); |
| 225 | if(!code) return await interaction.reply({embeds: [new EmojiEmbed().setTitle("Error").setDescription("An error occurred while creating the transcript.").setStatus("Danger").setEmoji("CONTROL.BLOCKCROSS")]}) |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 226 | let m: Message; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 227 | if (out !== "") { |
| 228 | const url = await pbClient.createPaste({ |
| 229 | code: out, |
| 230 | expireDate: ExpireDate.Never, |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 231 | name: |
| 232 | `Ticket Transcript ${ |
| 233 | member ? "for " + member.user.username + "#" + member.user.discriminator + " " : "" |
TheCodedProf | cfe8e9a | 2023-02-26 17:28:09 -0500 | [diff] [blame^] | 234 | }` + `(Created at ${new Date(interaction.channel.createdTimestamp!).toDateString()})`, |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 235 | publicity: Publicity.Unlisted |
| 236 | }); |
pineafan | 4e42594 | 2022-08-08 22:01:47 +0100 | [diff] [blame] | 237 | const guildConfig = await client.database.guilds.read(interaction.guild!.id); |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 238 | m = (await interaction.reply({ |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 239 | embeds: [ |
| 240 | new EmojiEmbed() |
| 241 | .setTitle("Transcript") |
| 242 | .setDescription( |
| 243 | "You can view the transcript using the link below. You can save the link for later" + |
| 244 | (guildConfig.logging.logs.channel |
| 245 | ? ` or find it in <#${guildConfig.logging.logs.channel}> once you press delete below. After this the channel will be deleted.` |
| 246 | : ".") |
| 247 | ) |
| 248 | .setStatus("Success") |
| 249 | .setEmoji("CONTROL.DOWNLOAD") |
| 250 | ], |
| 251 | components: [ |
PineaFan | 538d375 | 2023-01-12 21:48:23 +0000 | [diff] [blame] | 252 | new ActionRowBuilder<ButtonBuilder>().addComponents([ |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 253 | new ButtonBuilder().setLabel("View").setStyle(ButtonStyle.Link).setURL(url), |
| 254 | new ButtonBuilder() |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 255 | .setLabel("Delete") |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 256 | .setStyle(ButtonStyle.Danger) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 257 | .setCustomId("close") |
| 258 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 259 | ]) |
| 260 | ], |
| 261 | fetchReply: true |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 262 | })) as Message; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 263 | } else { |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 264 | m = (await interaction.reply({ |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 265 | embeds: [ |
| 266 | new EmojiEmbed() |
| 267 | .setTitle("Transcript") |
| 268 | .setDescription( |
| 269 | "The transcript was empty, so no changes were made. To delete this ticket, press the delete button below." |
| 270 | ) |
| 271 | .setStatus("Success") |
| 272 | .setEmoji("CONTROL.DOWNLOAD") |
| 273 | ], |
| 274 | components: [ |
PineaFan | 538d375 | 2023-01-12 21:48:23 +0000 | [diff] [blame] | 275 | new ActionRowBuilder<ButtonBuilder>().addComponents([ |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 276 | new ButtonBuilder() |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 277 | .setLabel("Delete") |
TheCodedProf | 21c0859 | 2022-09-13 14:14:43 -0400 | [diff] [blame] | 278 | .setStyle(ButtonStyle.Danger) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 279 | .setCustomId("close") |
| 280 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 281 | ]) |
| 282 | ], |
| 283 | fetchReply: true |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 284 | })) as Message; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 285 | } |
| 286 | let i; |
| 287 | try { |
PineaFan | 0d06edc | 2023-01-17 22:10:31 +0000 | [diff] [blame] | 288 | i = await m.awaitMessageComponent({ |
| 289 | time: 300000, |
TheCodedProf | 267563a | 2023-01-21 17:00:57 -0500 | [diff] [blame] | 290 | filter: (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id && i.message.id === m.id } |
PineaFan | 0d06edc | 2023-01-17 22:10:31 +0000 | [diff] [blame] | 291 | }); |
TheCodedProf | 267563a | 2023-01-21 17:00:57 -0500 | [diff] [blame] | 292 | await i.deferUpdate(); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 293 | } catch { |
| 294 | return; |
| 295 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 296 | const data = { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 297 | meta: { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 298 | type: "ticketDeleted", |
| 299 | displayName: "Ticket Deleted", |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 300 | calculateType: "ticketUpdate", |
| 301 | color: NucleusColors.red, |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 302 | emoji: "GUILD.TICKET.CLOSE", |
TheCodedProf | 6ec331b | 2023-02-20 12:13:06 -0500 | [diff] [blame] | 303 | timestamp: Date.now() |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 304 | }, |
| 305 | list: { |
pineafan | 3a02ea3 | 2022-08-11 21:35:04 +0100 | [diff] [blame] | 306 | ticketFor: member ? entry(member.id, renderUser(member.user)) : entry(null, "*Unknown*"), |
PineaFan | 538d375 | 2023-01-12 21:48:23 +0000 | [diff] [blame] | 307 | deletedBy: entry(interaction.member!.user.id, renderUser(interaction.member!.user as User)), |
TheCodedProf | 6ec331b | 2023-02-20 12:13:06 -0500 | [diff] [blame] | 308 | deleted: entry(Date.now().toString(), renderDelta(Date.now())) |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 309 | }, |
| 310 | hidden: { |
pineafan | 4e42594 | 2022-08-08 22:01:47 +0100 | [diff] [blame] | 311 | guild: interaction.guild!.id |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 312 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 313 | }; |
pineafan | 813bdf4 | 2022-07-24 10:39:10 +0100 | [diff] [blame] | 314 | log(data); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 315 | await interaction.channel.delete(); |
| 316 | return; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 317 | } |