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 | CommandInteraction, |
| 4 | GuildMember, |
| 5 | Message, |
| 6 | MessageActionRow, |
| 7 | MessageActionRowComponent, |
| 8 | MessageButton, |
| 9 | MessageComponentInteraction, |
| 10 | SelectMenuInteraction |
| 11 | } from "discord.js"; |
| 12 | import { |
| 13 | SelectMenuOption, |
| 14 | SlashCommandSubcommandBuilder |
| 15 | } from "@discordjs/builders"; |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame] | 16 | import EmojiEmbed from "../../utils/generateEmojiEmbed.js"; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 17 | import getEmojiByName from "../../utils/getEmojiByName.js"; |
| 18 | import generateKeyValueList from "../../utils/generateKeyValueList.js"; |
pineafan | 34369e6 | 2022-05-18 16:52:37 +0100 | [diff] [blame] | 19 | import createPageIndicator from "../../utils/createPageIndicator.js"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 20 | import client from "../../utils/client.js"; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 21 | |
| 22 | const command = (builder: SlashCommandSubcommandBuilder) => |
| 23 | builder |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 24 | .setName("about") |
| 25 | .setDescription("Shows info about a user") |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 26 | .addUserOption((option) => |
| 27 | option |
| 28 | .setName("user") |
| 29 | .setDescription( |
| 30 | "The user to get info about | Default: Yourself" |
| 31 | ) |
| 32 | ); |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 33 | |
| 34 | class Embed { |
| 35 | embed: Discord.MessageEmbed; |
| 36 | title: string; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 37 | description = ""; |
| 38 | pageId = 0; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 39 | setEmbed(embed: Discord.MessageEmbed) { |
| 40 | this.embed = embed; |
| 41 | return this; |
| 42 | } |
| 43 | setTitle(title: string) { |
| 44 | this.title = title; |
| 45 | return this; |
| 46 | } |
| 47 | setDescription(description: string) { |
| 48 | this.description = description; |
| 49 | return this; |
| 50 | } |
| 51 | setPageId(pageId: number) { |
| 52 | this.pageId = pageId; |
| 53 | return this; |
| 54 | } |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 55 | } |
| 56 | |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 57 | const callback = async (interaction: CommandInteraction): Promise<void> => { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 58 | const { renderUser, renderDelta } = client.logger; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 59 | const member = (interaction.options.getMember("user") || |
| 60 | interaction.member) as Discord.GuildMember; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 61 | const flags: string[] = []; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 62 | if ( |
| 63 | [ |
| 64 | "438733159748599813", // Pinea |
| 65 | "317731855317336067", // Mini |
| 66 | "261900651230003201", // Coded |
| 67 | "511655498676699136" // Zan |
| 68 | ].includes(member.user.id) |
| 69 | ) { |
| 70 | flags.push("NUCLEUSDEVELOPER"); |
| 71 | } |
| 72 | if ( |
| 73 | (await client.guilds.cache.get("684492926528651336")?.members.fetch()) |
| 74 | ?.filter((m: GuildMember) => |
| 75 | m.roles.cache.has("760896837866749972") |
| 76 | ) |
| 77 | ?.map((m: GuildMember) => m.id) |
| 78 | .includes(member.user.id) |
| 79 | ) { |
| 80 | flags.push("CLICKSDEVELOPER"); |
| 81 | } |
| 82 | member.user.flags.toArray().map((flag) => { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 83 | flags.push(flag.toString()); |
| 84 | }); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 85 | if (member.user.bot) { |
| 86 | flags.push("BOT"); |
| 87 | } |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 88 | // Check if they are boosting the server |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 89 | if (member.premiumSince) { |
| 90 | flags.push("BOOSTER"); |
| 91 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 92 | const nameReplacements = { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 93 | NUCLEUSDEVELOPER: "**Nucleus Developer**", |
| 94 | CLICKSDEVELOPER: "Clicks Developer", |
| 95 | HOUSE_BRAVERY: "Hypesquad Bravery", |
| 96 | HOUSE_BRILLIANCE: "Hypesquad Brilliance", |
| 97 | HOUSE_BALANCE: "Hypesquad Balance", |
| 98 | HYPESQUAD_EVENTS: "Hypesquad Events", |
| 99 | EARLY_SUPPORTER: "Early Supporter", |
| 100 | BUGHUNTER_LEVEL_1: "Bug Hunter Level 1", |
| 101 | BUGHUNTER_LEVEL_2: "Bug Hunter Level 2", |
| 102 | PARTNERED_SERVER_OWNER: "Partnered Server Owner", |
| 103 | DISCORD_EMPLOYEE: "Discord Staff", |
| 104 | EARLY_VERIFIED_BOT_DEVELOPER: "Verified Bot Developer", |
| 105 | BOT: "Bot", |
| 106 | BOOSTER: "Server Booster" |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 107 | }; |
| 108 | const members = await interaction.guild.members.fetch(); |
| 109 | const membersArray = [...members.values()]; |
| 110 | membersArray.sort((a, b) => a.joinedTimestamp - b.joinedTimestamp); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 111 | const joinPos = membersArray.findIndex((m) => m.id === member.user.id); |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 112 | |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 113 | const roles = member.roles.cache |
| 114 | .filter((r) => r.id !== interaction.guild.id) |
| 115 | .sort(); |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 116 | let s = ""; |
| 117 | let count = 0; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 118 | let ended = false; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 119 | roles.map((item) => { |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 120 | if (ended) return; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 121 | const string = `<@&${item.id}>, `; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 122 | if (s.length + string.length > 1000) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 123 | ended = true; |
| 124 | s += `and ${roles.size - count} more`; |
| 125 | return; |
| 126 | } |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 127 | count++; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 128 | s += string; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 129 | }); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 130 | if (s.length > 0 && !ended) s = s.slice(0, -2); |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 131 | |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 132 | let perms = ""; |
| 133 | const permsArray = { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 134 | ADMINISTRATOR: "Administrator", |
| 135 | MANAGE_GUILD: "Manage Server", |
| 136 | MANAGE_ROLES: "Manage Roles", |
| 137 | MANAGE_CHANNELS: "Manage Channels", |
| 138 | KICK_MEMBERS: "Kick Members", |
| 139 | BAN_MEMBERS: "Ban Members", |
| 140 | MODERATE_MEMBERS: "Moderate Members", |
| 141 | MANAGE_NICKNAMES: "Manage Nicknames", |
| 142 | MANAGE_WEBHOOKS: "Manage Webhooks", |
| 143 | MANAGE_MESSAGES: "Manage Messages", |
| 144 | VIEW_AUDIT_LOG: "View Audit Log", |
| 145 | MENTION_EVERYONE: "Mention Everyone" |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 146 | }; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 147 | Object.keys(permsArray).map((perm) => { |
| 148 | const hasPerm = member.permissions.has( |
| 149 | perm as Discord.PermissionString |
| 150 | ); |
| 151 | perms += `${getEmojiByName( |
| 152 | "CONTROL." + (hasPerm ? "TICK" : "CROSS") |
| 153 | )} ${permsArray[perm]}\n`; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 154 | }); |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 155 | |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 156 | let selectPaneOpen = false; |
| 157 | |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 158 | const embeds = [ |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 159 | new Embed() |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 160 | .setEmbed( |
| 161 | new EmojiEmbed() |
| 162 | .setTitle("User Info: General") |
| 163 | .setStatus("Success") |
| 164 | .setEmoji("MEMBER.JOIN") |
| 165 | .setDescription( |
| 166 | flags |
| 167 | .map((flag) => { |
| 168 | if (nameReplacements[flag]) { |
| 169 | return ( |
| 170 | getEmojiByName(`BADGES.${flag}`) + |
| 171 | " " + |
| 172 | nameReplacements[flag] |
| 173 | ); |
| 174 | } |
| 175 | }) |
| 176 | .join("\n") + |
| 177 | "\n\n" + |
| 178 | generateKeyValueList({ |
| 179 | member: renderUser(member.user), |
| 180 | nickname: member.nickname || "*None set*", |
| 181 | id: `\`${member.id}\``, |
| 182 | "joined the server": renderDelta( |
| 183 | member.joinedTimestamp |
| 184 | ), |
| 185 | "joined discord": renderDelta( |
| 186 | member.user.createdTimestamp |
| 187 | ), |
| 188 | "boost status": member.premiumSince |
| 189 | ? `Started boosting ${renderDelta( |
| 190 | member.premiumSinceTimestamp |
| 191 | )}` |
| 192 | : "*Not boosting*", |
| 193 | "join position": `${joinPos + 1}` |
| 194 | }) |
| 195 | ) |
| 196 | .setThumbnail( |
| 197 | member.user.displayAvatarURL({ dynamic: true }) |
| 198 | ) |
| 199 | .setImage( |
| 200 | (await member.user.fetch()).bannerURL({ format: "gif" }) |
| 201 | ) |
| 202 | ) |
| 203 | .setTitle("General") |
| 204 | .setDescription("General information about the user") |
| 205 | .setPageId(0), |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 206 | new Embed() |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 207 | .setEmbed( |
| 208 | new EmojiEmbed() |
| 209 | .setTitle("User Info: Roles") |
| 210 | .setStatus("Success") |
| 211 | .setEmoji("GUILD.ROLES.CREATE") |
| 212 | .setDescription( |
| 213 | generateKeyValueList({ |
| 214 | member: renderUser(member.user), |
| 215 | id: `\`${member.id}\``, |
| 216 | roles: `${member.roles.cache.size - 1}` |
| 217 | }) + |
| 218 | "\n" + |
| 219 | (s.length > 0 ? s : "*None*") + |
| 220 | "\n" |
| 221 | ) |
| 222 | .setThumbnail( |
| 223 | member.user.displayAvatarURL({ dynamic: true }) |
| 224 | ) |
| 225 | ) |
| 226 | .setTitle("Roles") |
| 227 | .setDescription("Roles the user has") |
| 228 | .setPageId(1), |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 229 | new Embed() |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 230 | .setEmbed( |
| 231 | new EmojiEmbed() |
| 232 | .setTitle("User Info: Key Permissions") |
| 233 | .setStatus("Success") |
| 234 | .setEmoji("GUILD.ROLES.CREATE") |
| 235 | .setDescription( |
| 236 | generateKeyValueList({ |
| 237 | member: renderUser(member.user), |
| 238 | id: `\`${member.id}\`` |
| 239 | }) + |
| 240 | "\n" + |
| 241 | perms |
| 242 | ) |
| 243 | .setThumbnail( |
| 244 | member.user.displayAvatarURL({ dynamic: true }) |
| 245 | ) |
| 246 | ) |
| 247 | .setTitle("Key Permissions") |
| 248 | .setDescription("Key permissions the user has") |
| 249 | .setPageId(2) |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 250 | ]; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 251 | const m = (await interaction.reply({ |
| 252 | embeds: LoadingEmbed, |
| 253 | fetchReply: true, |
| 254 | ephemeral: true |
| 255 | })) as Message; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 256 | let page = 0; |
| 257 | let breakReason = ""; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 258 | while (true) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 259 | const em = new Discord.MessageEmbed(embeds[page].embed); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 260 | em.setDescription( |
| 261 | em.description + "\n" + createPageIndicator(embeds.length, page) |
| 262 | ); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 263 | let selectPane = []; |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 264 | |
| 265 | if (selectPaneOpen) { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 266 | const options = []; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 267 | embeds.forEach((embed) => { |
| 268 | options.push( |
| 269 | new SelectMenuOption({ |
| 270 | label: embed.title, |
| 271 | value: embed.pageId.toString(), |
| 272 | description: embed.description || "" |
| 273 | }) |
| 274 | ); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 275 | }); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 276 | selectPane = [ |
| 277 | new MessageActionRow().addComponents([ |
| 278 | new Discord.MessageSelectMenu() |
| 279 | .addOptions(options) |
| 280 | .setCustomId("page") |
| 281 | .setMaxValues(1) |
| 282 | .setPlaceholder("Choose a page...") |
| 283 | ]) |
| 284 | ]; |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 285 | } |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 286 | await interaction.editReply({ |
pineafan | 34369e6 | 2022-05-18 16:52:37 +0100 | [diff] [blame] | 287 | embeds: [em], |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 288 | components: selectPane.concat([ |
| 289 | new MessageActionRow().addComponents([ |
| 290 | new MessageButton() |
| 291 | .setEmoji(getEmojiByName("CONTROL.LEFT", "id")) |
| 292 | .setStyle("SECONDARY") |
| 293 | .setCustomId("left") |
| 294 | .setDisabled(page === 0), |
| 295 | new MessageButton() |
| 296 | .setEmoji(getEmojiByName("CONTROL.MENU", "id")) |
| 297 | .setStyle(selectPaneOpen ? "PRIMARY" : "SECONDARY") |
| 298 | .setCustomId("select") |
| 299 | .setDisabled(false), |
| 300 | new MessageButton() |
| 301 | .setEmoji(getEmojiByName("CONTROL.RIGHT", "id")) |
| 302 | .setCustomId("right") |
| 303 | .setStyle("SECONDARY") |
| 304 | .setDisabled(page === embeds.length - 1), |
| 305 | new MessageButton() |
| 306 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 307 | .setCustomId("close") |
| 308 | .setStyle("DANGER") |
| 309 | ]) |
| 310 | ]) |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 311 | }); |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 312 | let i: MessageComponentInteraction; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 313 | try { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 314 | i = await m.awaitMessageComponent({ time: 300000 }); |
| 315 | } catch { |
| 316 | breakReason = "Message timed out"; |
| 317 | break; |
| 318 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 319 | i.deferUpdate(); |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 320 | if ((i.component as MessageActionRowComponent).customId === "left") { |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 321 | if (page > 0) page--; |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 322 | selectPaneOpen = false; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 323 | } else if ( |
| 324 | (i.component as MessageActionRowComponent).customId === "right" |
| 325 | ) { |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 326 | if (page < embeds.length - 1) page++; |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 327 | selectPaneOpen = false; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 328 | } else if ( |
| 329 | (i.component as MessageActionRowComponent).customId === "select" |
| 330 | ) { |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 331 | selectPaneOpen = !selectPaneOpen; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 332 | } else if ( |
| 333 | (i.component as MessageActionRowComponent).customId === "close" |
| 334 | ) { |
pineafan | 167bde3 | 2022-05-19 19:33:46 +0100 | [diff] [blame] | 335 | breakReason = "Message closed"; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 336 | break; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 337 | } else if ( |
| 338 | (i.component as MessageActionRowComponent).customId === "page" |
| 339 | ) { |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 340 | page = parseInt((i as SelectMenuInteraction).values[0]); |
pineafan | ea06304 | 2022-05-19 19:08:44 +0100 | [diff] [blame] | 341 | selectPaneOpen = false; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 342 | } else { |
pineafan | 167bde3 | 2022-05-19 19:33:46 +0100 | [diff] [blame] | 343 | breakReason = "Message closed"; |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 344 | break; |
| 345 | } |
| 346 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 347 | const em = new Discord.MessageEmbed(embeds[page].embed); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 348 | em.setDescription( |
| 349 | em.description + |
| 350 | "\n" + |
| 351 | createPageIndicator(embeds.length, page) + |
| 352 | " | " + |
| 353 | breakReason |
| 354 | ); |
| 355 | await interaction.editReply({ |
| 356 | embeds: [em], |
| 357 | components: [ |
| 358 | new MessageActionRow().addComponents([ |
| 359 | new MessageButton() |
| 360 | .setEmoji(getEmojiByName("CONTROL.LEFT", "id")) |
| 361 | .setStyle("SECONDARY") |
| 362 | .setCustomId("left") |
| 363 | .setDisabled(true), |
| 364 | new MessageButton() |
| 365 | .setEmoji(getEmojiByName("CONTROL.MENU", "id")) |
| 366 | .setStyle("SECONDARY") |
| 367 | .setCustomId("select") |
| 368 | .setDisabled(true), |
| 369 | new MessageButton() |
| 370 | .setEmoji(getEmojiByName("CONTROL.RIGHT", "id")) |
| 371 | .setCustomId("right") |
| 372 | .setStyle("SECONDARY") |
| 373 | .setDisabled(true), |
| 374 | new MessageButton() |
| 375 | .setEmoji(getEmojiByName("CONTROL.CROSS", "id")) |
| 376 | .setCustomId("close") |
| 377 | .setStyle("DANGER") |
| 378 | .setDisabled(true) |
| 379 | ]) |
| 380 | ] |
| 381 | }); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 382 | }; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 383 | |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 384 | const check = () => { |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 385 | return true; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 386 | }; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 387 | |
| 388 | export { command }; |
| 389 | export { callback }; |
Skyler Grey | 1a67e18 | 2022-08-04 23:05:44 +0100 | [diff] [blame] | 390 | export { check }; |