pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 1 | import { LoadingEmbed } from "./../../utils/defaultEmbeds.js"; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 2 | import Discord, { |
| 3 | Channel, |
| 4 | CommandInteraction, |
| 5 | Message, |
| 6 | MessageActionRow, |
| 7 | MessageButton, |
| 8 | MessageComponentInteraction, |
| 9 | Role |
| 10 | } from "discord.js"; |
Skyler Grey | c634e2b | 2022-08-06 17:50:48 +0100 | [diff] [blame] | 11 | import type { SlashCommandSubcommandBuilder } from "@discordjs/builders"; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 12 | import EmojiEmbed from "../../utils/generateEmojiEmbed.js"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 13 | import client from "../../utils/client.js"; |
| 14 | import confirmationMessage from "../../utils/confirmationMessage.js"; |
| 15 | import generateKeyValueList from "../../utils/generateKeyValueList.js"; |
Skyler Grey | c634e2b | 2022-08-06 17:50:48 +0100 | [diff] [blame] | 16 | import { ChannelType } from "discord-api-types/v9"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 17 | import getEmojiByName from "../../utils/getEmojiByName.js"; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 18 | |
| 19 | const command = (builder: SlashCommandSubcommandBuilder) => |
| 20 | builder |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 21 | .setName("welcome") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 22 | .setDescription("Messages and roles sent or given when someone joins the server") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 23 | .addStringOption((option) => |
| 24 | option |
| 25 | .setName("message") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 26 | .setDescription("The message to send when someone joins the server") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 27 | .setAutocomplete(true) |
| 28 | ) |
| 29 | .addRoleOption((option) => |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 30 | option.setName("role").setDescription("The role given when someone joins the server") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 31 | ) |
| 32 | .addRoleOption((option) => |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 33 | option.setName("ping").setDescription("The role pinged when someone joins the server") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 34 | ) |
| 35 | .addChannelOption((option) => |
| 36 | option |
| 37 | .setName("channel") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 38 | .setDescription("The channel the welcome message should be sent to") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 39 | .addChannelTypes([ChannelType.GuildText, ChannelType.GuildNews]) |
| 40 | ); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 41 | |
Skyler Grey | c634e2b | 2022-08-06 17:50:48 +0100 | [diff] [blame] | 42 | const callback = async (interaction: CommandInteraction): Promise<unknown> => { |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 43 | const { renderRole, renderChannel, log, NucleusColors, entry, renderUser } = client.logger; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 44 | await interaction.reply({ |
| 45 | embeds: LoadingEmbed, |
| 46 | fetchReply: true, |
| 47 | ephemeral: true |
| 48 | }); |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 49 | let m: Message; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 50 | if ( |
| 51 | interaction.options.getRole("role") || |
| 52 | interaction.options.getChannel("channel") || |
| 53 | interaction.options.getString("message") |
| 54 | ) { |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 55 | let role: Role; |
| 56 | let ping: Role; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 57 | const message = interaction.options.getString("message"); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 58 | try { |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 59 | role = interaction.options.getRole("role") as Role; |
| 60 | ping = interaction.options.getRole("ping") as Role; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 61 | } catch { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 62 | return await interaction.editReply({ |
| 63 | embeds: [ |
| 64 | new EmojiEmbed() |
| 65 | .setEmoji("GUILD.ROLES.DELETE") |
| 66 | .setTitle("Welcome Events") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 67 | .setDescription("The role you provided is not a valid role") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 68 | .setStatus("Danger") |
| 69 | ] |
| 70 | }); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 71 | } |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 72 | let channel: Channel; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 73 | try { |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 74 | channel = interaction.options.getChannel("channel") as Channel; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 75 | } catch { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 76 | return await interaction.editReply({ |
| 77 | embeds: [ |
| 78 | new EmojiEmbed() |
| 79 | .setEmoji("GUILD.ROLES.DELETE") |
| 80 | .setTitle("Welcome Events") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 81 | .setDescription("The channel you provided is not a valid channel") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 82 | .setStatus("Danger") |
| 83 | ] |
| 84 | }); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 85 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 86 | const options = {}; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 87 | if (role) options.role = renderRole(role); |
| 88 | if (ping) options.ping = renderRole(ping); |
| 89 | if (channel) options.channel = renderChannel(channel); |
| 90 | if (message) options.message = "\n> " + message; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 91 | const confirmation = await new confirmationMessage(interaction) |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 92 | .setEmoji("GUILD.ROLES.EDIT") |
| 93 | .setTitle("Welcome Events") |
| 94 | .setDescription(generateKeyValueList(options)) |
| 95 | .setColor("Warning") |
| 96 | .setInverted(true) |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 97 | .send(true); |
| 98 | if (confirmation.cancelled) return; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 99 | if (confirmation.success) { |
| 100 | try { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 101 | const toChange = {}; |
| 102 | if (role) toChange["welcome.role"] = role.id; |
| 103 | if (ping) toChange["welcome.ping"] = ping.id; |
| 104 | if (channel) toChange["welcome.channel"] = channel.id; |
| 105 | if (message) toChange["welcome.message"] = message; |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 106 | await client.database.guilds.write(interaction.guild.id, toChange); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 107 | const list = { |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 108 | memberId: entry(interaction.user.id, `\`${interaction.user.id}\``), |
| 109 | changedBy: entry(interaction.user.id, renderUser(interaction.user)) |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 110 | }; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 111 | if (role) list.role = entry(role.id, renderRole(role)); |
| 112 | if (ping) list.ping = entry(ping.id, renderRole(ping)); |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 113 | if (channel) list.channel = entry(channel.id, renderChannel(channel.id)); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 114 | if (message) list.message = entry(message, `\`${message}\``); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 115 | const data = { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 116 | meta: { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 117 | type: "welcomeSettingsUpdated", |
| 118 | displayName: "Welcome Settings Changed", |
| 119 | calculateType: "nucleusSettingsUpdated", |
| 120 | color: NucleusColors.green, |
| 121 | emoji: "CONTROL.BLOCKTICK", |
| 122 | timestamp: new Date().getTime() |
| 123 | }, |
| 124 | list: list, |
| 125 | hidden: { |
| 126 | guild: interaction.guild.id |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 127 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 128 | }; |
| 129 | log(data); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 130 | } catch (e) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 131 | console.log(e); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 132 | return interaction.editReply({ |
| 133 | embeds: [ |
| 134 | new EmojiEmbed() |
| 135 | .setTitle("Welcome Events") |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 136 | .setDescription("Something went wrong while updating welcome settings") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 137 | .setStatus("Danger") |
| 138 | .setEmoji("GUILD.ROLES.DELETE") |
| 139 | ], |
| 140 | components: [] |
| 141 | }); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 142 | } |
| 143 | } else { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 144 | return interaction.editReply({ |
| 145 | embeds: [ |
| 146 | new EmojiEmbed() |
| 147 | .setTitle("Welcome Events") |
| 148 | .setDescription("No changes were made") |
| 149 | .setStatus("Success") |
| 150 | .setEmoji("GUILD.ROLES.CREATE") |
| 151 | ], |
| 152 | components: [] |
| 153 | }); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 154 | } |
| 155 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 156 | let lastClicked = null; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 157 | while (true) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 158 | const config = await client.database.guilds.read(interaction.guild.id); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 159 | m = (await interaction.editReply({ |
| 160 | embeds: [ |
| 161 | new EmojiEmbed() |
| 162 | .setTitle("Welcome Events") |
| 163 | .setDescription( |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 164 | `**Message:** ${config.welcome.message ? `\n> ${config.welcome.message}` : "*None set*"}\n` + |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 165 | `**Role:** ${ |
| 166 | config.welcome.role |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 167 | ? renderRole(await interaction.guild.roles.fetch(config.welcome.role)) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 168 | : "*None set*" |
| 169 | }\n` + |
| 170 | `**Ping:** ${ |
| 171 | config.welcome.ping |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 172 | ? renderRole(await interaction.guild.roles.fetch(config.welcome.ping)) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 173 | : "*None set*" |
| 174 | }\n` + |
| 175 | `**Channel:** ${ |
| 176 | config.welcome.channel |
| 177 | ? config.welcome.channel == "dm" |
| 178 | ? "DM" |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 179 | : renderChannel(await interaction.guild.channels.fetch(config.welcome.channel)) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 180 | : "*None set*" |
| 181 | }` |
| 182 | ) |
| 183 | .setStatus("Success") |
| 184 | .setEmoji("CHANNEL.TEXT.CREATE") |
| 185 | ], |
| 186 | components: [ |
| 187 | new MessageActionRow().addComponents([ |
| 188 | new MessageButton() |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 189 | .setLabel(lastClicked == "clear-message" ? "Click again to confirm" : "Clear Message") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 190 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 191 | .setCustomId("clear-message") |
| 192 | .setDisabled(!config.welcome.message) |
| 193 | .setStyle("DANGER"), |
| 194 | new MessageButton() |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 195 | .setLabel(lastClicked == "clear-role" ? "Click again to confirm" : "Clear Role") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 196 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 197 | .setCustomId("clear-role") |
| 198 | .setDisabled(!config.welcome.role) |
| 199 | .setStyle("DANGER"), |
| 200 | new MessageButton() |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 201 | .setLabel(lastClicked == "clear-ping" ? "Click again to confirm" : "Clear Ping") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 202 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 203 | .setCustomId("clear-ping") |
| 204 | .setDisabled(!config.welcome.ping) |
| 205 | .setStyle("DANGER"), |
| 206 | new MessageButton() |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 207 | .setLabel(lastClicked == "clear-channel" ? "Click again to confirm" : "Clear Channel") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 208 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 209 | .setCustomId("clear-channel") |
| 210 | .setDisabled(!config.welcome.channel) |
| 211 | .setStyle("DANGER"), |
| 212 | new MessageButton() |
| 213 | .setLabel("Set Channel to DM") |
| 214 | .setCustomId("set-channel-dm") |
| 215 | .setDisabled(config.welcome.channel == "dm") |
| 216 | .setStyle("SECONDARY") |
| 217 | ]) |
| 218 | ] |
| 219 | })) as Message; |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 220 | let i: MessageComponentInteraction; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 221 | try { |
| 222 | i = await m.awaitMessageComponent({ time: 300000 }); |
| 223 | } catch (e) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 224 | break; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 225 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 226 | i.deferUpdate(); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 227 | if (i.customId == "clear-message") { |
| 228 | if (lastClicked == "clear-message") { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 229 | await client.database.guilds.write(interaction.guild.id, { |
| 230 | "welcome.message": null |
| 231 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 232 | lastClicked = null; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 233 | } else { |
| 234 | lastClicked = "clear-message"; |
| 235 | } |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 236 | } else if (i.customId == "clear-role") { |
| 237 | if (lastClicked == "clear-role") { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 238 | await client.database.guilds.write(interaction.guild.id, { |
| 239 | "welcome.role": null |
| 240 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 241 | lastClicked = null; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 242 | } else { |
| 243 | lastClicked = "clear-role"; |
| 244 | } |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 245 | } else if (i.customId == "clear-ping") { |
| 246 | if (lastClicked == "clear-ping") { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 247 | await client.database.guilds.write(interaction.guild.id, { |
| 248 | "welcome.ping": null |
| 249 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 250 | lastClicked = null; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 251 | } else { |
| 252 | lastClicked = "clear-ping"; |
| 253 | } |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 254 | } else if (i.customId == "clear-channel") { |
| 255 | if (lastClicked == "clear-channel") { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 256 | await client.database.guilds.write(interaction.guild.id, { |
| 257 | "welcome.channel": null |
| 258 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 259 | lastClicked = null; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 260 | } else { |
| 261 | lastClicked = "clear-channel"; |
| 262 | } |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 263 | } else if (i.customId == "set-channel-dm") { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 264 | await client.database.guilds.write(interaction.guild.id, { |
| 265 | "welcome.channel": "dm" |
| 266 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 267 | lastClicked = null; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 268 | } |
| 269 | } |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 270 | await interaction.editReply({ |
| 271 | embeds: [m.embeds[0].setFooter({ text: "Message closed" })], |
| 272 | components: [] |
| 273 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 274 | }; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 275 | |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 276 | const check = (interaction: CommandInteraction) => { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 277 | const member = interaction.member as Discord.GuildMember; |
| 278 | if (!member.permissions.has("MANAGE_GUILD")) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 279 | throw new Error("You must have the *Manage Server* permission to use this command"); |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 280 | return true; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 281 | }; |
pineafan | 41d9356 | 2022-07-30 22:10:15 +0100 | [diff] [blame] | 282 | |
| 283 | export { command }; |
| 284 | export { callback }; |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 285 | export { check }; |