flora is a fast and secure runtime that lets you write discord bots for your servers, with a rich TypeScript SDK, without worrying about running infrastructure. [mirror]
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at c71d2aad7d48d60cc8c4cef21d693a4c2d7f8a41 950 lines 29 kB view raw
1var flora = (function(exports) { 2 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }) 3 // #region src/sdk/commands.ts 4 function prefix(command) { 5 return command 6 } 7 function slash(command) { 8 return command 9 } 10 function getCreateBotState() { 11 const state = globalThis.__floraCreateBotState 12 if (state) return state 13 const initialState = { initialized: false } 14 globalThis.__floraCreateBotState = initialState 15 return initialState 16 } 17 function createBot(options) { 18 const state = getCreateBotState() 19 if (state.initialized) { 20 console.log('[flora/sdk] createBot called multiple times; skipping duplicate registration') 21 return 22 } 23 state.initialized = true 24 const prefix = options.prefix ?? '!' 25 const commands = options.commands ?? options.prefixCommands ?? [] 26 const slashCommands = options.slashCommands ?? [] 27 on('messageCreate', async (ctx) => { 28 if (!ctx.msg || !ctx.msg.content) return 29 if (ctx.msg.author?.bot) return 30 const content = ctx.msg.content.trim() 31 if (!content.startsWith(prefix)) return 32 const [commandName, ...args] = content.slice(prefix.length).trim().split(/\s+/) 33 const command = commands.find((cmd) => cmd.name === commandName) 34 if (!command) return 35 await command.run({ 36 ...ctx, 37 args 38 }) 39 }) 40 on('interactionCreate', async (ctx) => { 41 if (!ctx.msg) return 42 const command = slashCommands.find((cmd) => cmd.name === ctx.msg.commandName) 43 if (!command) return 44 if (command.subcommands && command.subcommands.length > 0) { 45 await handleSubcommand(ctx, command) 46 } else if (command.run) { 47 const rawData = ctx.msg.data 48 const options = flattenInteractionOptions(rawData?.options || []) 49 await command.run({ 50 ...ctx, 51 options 52 }) 53 } 54 }) 55 if (slashCommands.length && typeof registerSlashCommands === 'function') { 56 const flattenedCommands = flattenCommands(slashCommands) 57 registerSlashCommands(flattenedCommands) 58 } 59 } 60 function flattenCommands(commands) { 61 const subcommands = globalThis.__floraSubcommands 62 globalThis.__floraSubcommands = subcommands || {} 63 return commands.map((cmd) => { 64 if (cmd.subcommands && cmd.subcommands.length > 0) { 65 const submap = {} 66 cmd.subcommands.forEach((sub) => { 67 submap[sub.name] = sub.run 68 }) 69 globalThis.__floraSubcommands[cmd.name] = submap 70 return { 71 name: cmd.name, 72 description: cmd.description, 73 options: cmd.subcommands.map((sub) => ({ 74 name: sub.name, 75 description: sub.description, 76 type: 'subcommand', 77 options: sub.options 78 })) 79 } 80 } 81 return { 82 name: cmd.name, 83 description: cmd.description, 84 options: cmd.options 85 } 86 }) 87 } 88 async function handleSubcommand(ctx, command) { 89 const rawData = ctx.msg.data 90 if (!rawData?.options || !Array.isArray(rawData.options)) return 91 const firstOption = rawData.options[0] 92 if (!firstOption) return 93 const subcommandName = firstOption.name 94 const subcommandMap = globalThis.__floraSubcommands?.[command.name] 95 if (!subcommandMap) return 96 const subcommandHandler = subcommandMap[subcommandName] 97 if (!subcommandHandler) return 98 const flatOptions = flattenInteractionOptions(firstOption.options || []) 99 await subcommandHandler({ 100 ...ctx, 101 options: flatOptions 102 }) 103 } 104 function flattenInteractionOptions(options) { 105 const result = {} 106 for (const opt of options) { 107 if (opt.type === 1 || opt.type === 2) { 108 Object.assign(result, flattenInteractionOptions(opt.options || [])) 109 } else result[opt.name] = opt.value 110 } 111 return result 112 } 113 // #endregion 114 // #region src/generated.ts 115 const ButtonStyle = { 116 Primary: 1, 117 Secondary: 2, 118 Success: 3, 119 Danger: 4 120 } 121 const ComponentType = { 122 ActionRow: 1, 123 Button: 2, 124 StringSelect: 3, 125 InputText: 4, 126 UserSelect: 5, 127 RoleSelect: 6, 128 MentionableSelect: 7, 129 ChannelSelect: 8, 130 Section: 9, 131 TextDisplay: 10, 132 Thumbnail: 11, 133 MediaGallery: 12, 134 File: 13, 135 Separator: 14, 136 Container: 17, 137 Label: 18, 138 FileUpload: 19 139 } 140 const InputTextStyle = { 141 Short: 1, 142 Paragraph: 2 143 } 144 const MessageFlags = { 145 CROSSPOSTED: 1, 146 IS_CROSSPOST: 2, 147 SUPPRESS_EMBEDS: 4, 148 SOURCE_MESSAGE_DELETED: 8, 149 URGENT: 16, 150 HAS_THREAD: 32, 151 EPHEMERAL: 64, 152 LOADING: 128, 153 FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: 256, 154 SUPPRESS_NOTIFICATIONS: 4096, 155 IS_VOICE_MESSAGE: 8192, 156 IS_COMPONENTS_V2: 32768 157 } 158 // #endregion 159 // #region src/sdk/components.ts 160 const isBuilder = (value) => typeof value?.toJSON === 'function' 161 const resolveComponent = (value) => isBuilder(value) ? value.toJSON() : value 162 var ActionRowBuilder = class { 163 #components = [] 164 addComponents(...components) { 165 this.#components.push(...components) 166 return this 167 } 168 setComponents(components) { 169 this.#components = [...components] 170 return this 171 } 172 toJSON() { 173 return { 174 type: ComponentType.ActionRow, 175 components: this.#components.map(resolveComponent) 176 } 177 } 178 } 179 var ButtonBuilder = class { 180 #data = { type: ComponentType.Button } 181 setStyle(style) { 182 this.#data.style = style 183 return this 184 } 185 setCustomId(customId) { 186 this.#data.custom_id = customId 187 return this 188 } 189 setUrl(url) { 190 this.#data.style = 5 191 this.#data.url = url 192 return this 193 } 194 setSkuId(skuId) { 195 this.#data.style = 6 196 this.#data.sku_id = skuId 197 return this 198 } 199 setLabel(label) { 200 this.#data.label = label 201 return this 202 } 203 setEmoji(emoji) { 204 this.#data.emoji = emoji 205 return this 206 } 207 setDisabled(disabled = true) { 208 this.#data.disabled = disabled 209 return this 210 } 211 toJSON() { 212 return { ...this.#data } 213 } 214 } 215 var SelectMenuBuilderBase = class { 216 data 217 constructor(type, customId) { 218 this.data = { 219 type, 220 custom_id: customId 221 } 222 } 223 setCustomId(customId) { 224 this.data.custom_id = customId 225 return this 226 } 227 setPlaceholder(placeholder) { 228 this.data.placeholder = placeholder 229 return this 230 } 231 setMinValues(min) { 232 this.data.min_values = min 233 return this 234 } 235 setMaxValues(max) { 236 this.data.max_values = max 237 return this 238 } 239 setRequired(required = true) { 240 this.data.required = required 241 return this 242 } 243 setDisabled(disabled = true) { 244 this.data.disabled = disabled 245 return this 246 } 247 setChannelTypes(types) { 248 this.data.channel_types = [...types] 249 return this 250 } 251 setDefaultValues(values) { 252 this.data.default_values = values.map((value) => ({ ...value })) 253 return this 254 } 255 setDefaultUsers(ids) { 256 this.data.default_users = [...ids] 257 return this 258 } 259 setDefaultRoles(ids) { 260 this.data.default_roles = [...ids] 261 return this 262 } 263 setDefaultChannels(ids) { 264 this.data.default_channels = [...ids] 265 return this 266 } 267 addDefaultUser(id) { 268 const current = this.data.default_users ?? [] 269 this.data.default_users = [...current, id] 270 return this 271 } 272 addDefaultRole(id) { 273 const current = this.data.default_roles ?? [] 274 this.data.default_roles = [...current, id] 275 return this 276 } 277 addDefaultChannel(id) { 278 const current = this.data.default_channels ?? [] 279 this.data.default_channels = [...current, id] 280 return this 281 } 282 addDefaultValue(id, type) { 283 const current = this.data.default_values ?? [] 284 this.data.default_values = [...current, { 285 id, 286 type 287 }] 288 return this 289 } 290 toJSON() { 291 return { ...this.data } 292 } 293 } 294 var StringSelectMenuBuilder = class extends SelectMenuBuilderBase { 295 constructor(customId) { 296 super(ComponentType.StringSelect, customId) 297 } 298 setOptions(options) { 299 this.data.options = options.map((option) => ({ ...option })) 300 return this 301 } 302 addOptions(...options) { 303 const current = this.data.options ?? [] 304 this.data.options = [...current, ...options.map((option) => ({ ...option }))] 305 return this 306 } 307 } 308 var UserSelectMenuBuilder = class extends SelectMenuBuilderBase { 309 constructor(customId) { 310 super(ComponentType.UserSelect, customId) 311 } 312 } 313 var RoleSelectMenuBuilder = class extends SelectMenuBuilderBase { 314 constructor(customId) { 315 super(ComponentType.RoleSelect, customId) 316 } 317 } 318 var MentionableSelectMenuBuilder = class extends SelectMenuBuilderBase { 319 constructor(customId) { 320 super(ComponentType.MentionableSelect, customId) 321 } 322 } 323 var ChannelSelectMenuBuilder = class extends SelectMenuBuilderBase { 324 constructor(customId) { 325 super(ComponentType.ChannelSelect, customId) 326 } 327 } 328 var InputTextBuilder = class { 329 #data 330 constructor(customId) { 331 this.#data = { 332 type: ComponentType.InputText, 333 custom_id: customId 334 } 335 } 336 setCustomId(customId) { 337 this.#data.custom_id = customId 338 return this 339 } 340 setStyle(style) { 341 this.#data.style = style 342 return this 343 } 344 setMinLength(min) { 345 this.#data.min_length = min 346 return this 347 } 348 setMaxLength(max) { 349 this.#data.max_length = max 350 return this 351 } 352 setRequired(required = true) { 353 this.#data.required = required 354 return this 355 } 356 setValue(value) { 357 this.#data.value = value 358 return this 359 } 360 setPlaceholder(placeholder) { 361 this.#data.placeholder = placeholder 362 return this 363 } 364 toJSON() { 365 return { ...this.#data } 366 } 367 } 368 var TextDisplayBuilder = class { 369 #data 370 constructor(content) { 371 this.#data = { 372 type: ComponentType.TextDisplay, 373 content 374 } 375 } 376 setContent(content) { 377 this.#data.content = content 378 return this 379 } 380 toJSON() { 381 return { ...this.#data } 382 } 383 } 384 var ThumbnailBuilder = class { 385 #data 386 constructor(url) { 387 this.#data = { 388 type: ComponentType.Thumbnail, 389 media: { url } 390 } 391 } 392 setUrl(url) { 393 this.#data.media = { url } 394 return this 395 } 396 setDescription(description) { 397 this.#data.description = description 398 return this 399 } 400 setSpoiler(spoiler = true) { 401 this.#data.spoiler = spoiler 402 return this 403 } 404 toJSON() { 405 return { ...this.#data } 406 } 407 } 408 var SectionBuilder = class { 409 #components = [] 410 #accessory 411 addComponents(...components) { 412 this.#components.push(...components) 413 return this 414 } 415 setComponents(components) { 416 this.#components = [...components] 417 return this 418 } 419 setAccessory(accessory) { 420 this.#accessory = accessory 421 return this 422 } 423 toJSON() { 424 return { 425 type: ComponentType.Section, 426 components: this.#components.map(resolveComponent), 427 accessory: this.#accessory ? resolveComponent(this.#accessory) : null 428 } 429 } 430 } 431 var MediaGalleryBuilder = class { 432 #items = [] 433 addItem(url, options) { 434 const item = { 435 media: { url }, 436 description: options?.description, 437 spoiler: options?.spoiler 438 } 439 this.#items.push(item) 440 return this 441 } 442 setItems(items) { 443 this.#items = items.map((item) => ({ 444 ...item, 445 media: { ...item.media } 446 })) 447 return this 448 } 449 toJSON() { 450 return { 451 type: ComponentType.MediaGallery, 452 items: this.#items.map((item) => ({ 453 ...item, 454 media: { ...item.media } 455 })) 456 } 457 } 458 } 459 var FileBuilder = class { 460 #data 461 constructor(url) { 462 this.#data = { 463 type: ComponentType.File, 464 file: { url } 465 } 466 } 467 setUrl(url) { 468 this.#data.file = { url } 469 return this 470 } 471 setSpoiler(spoiler = true) { 472 this.#data.spoiler = spoiler 473 return this 474 } 475 toJSON() { 476 return { ...this.#data } 477 } 478 } 479 var SeparatorBuilder = class { 480 #data 481 constructor(divider = true) { 482 this.#data = { 483 type: ComponentType.Separator, 484 divider 485 } 486 } 487 setDivider(divider = true) { 488 this.#data.divider = divider 489 return this 490 } 491 setSpacing(spacing) { 492 this.#data.spacing = spacing 493 return this 494 } 495 toJSON() { 496 return { ...this.#data } 497 } 498 } 499 var ContainerBuilder = class { 500 #components = [] 501 #accentColor 502 #spoiler 503 addComponents(...components) { 504 this.#components.push(...components) 505 return this 506 } 507 setComponents(components) { 508 this.#components = [...components] 509 return this 510 } 511 setAccentColor(color) { 512 this.#accentColor = color 513 return this 514 } 515 setSpoiler(spoiler = true) { 516 this.#spoiler = spoiler 517 return this 518 } 519 toJSON() { 520 const data = { 521 type: ComponentType.Container, 522 components: this.#components.map(resolveComponent) 523 } 524 if (this.#accentColor !== void 0) data.accent_color = this.#accentColor 525 if (this.#spoiler !== void 0) data.spoiler = this.#spoiler 526 return data 527 } 528 } 529 var LabelBuilder = class { 530 #label 531 #description 532 #component 533 constructor(label) { 534 this.#label = label 535 } 536 setLabel(label) { 537 this.#label = label 538 return this 539 } 540 setDescription(description) { 541 this.#description = description 542 return this 543 } 544 setComponent(component) { 545 this.#component = component 546 return this 547 } 548 toJSON() { 549 const data = { 550 type: ComponentType.Label, 551 label: this.#label, 552 component: this.#component ? resolveComponent(this.#component) : null 553 } 554 if (this.#description !== void 0) data.description = this.#description 555 return data 556 } 557 } 558 var FileUploadBuilder = class { 559 #data 560 constructor(customId) { 561 this.#data = { 562 type: ComponentType.FileUpload, 563 custom_id: customId 564 } 565 } 566 setCustomId(customId) { 567 this.#data.custom_id = customId 568 return this 569 } 570 setMinValues(min) { 571 this.#data.min_values = min 572 return this 573 } 574 setMaxValues(max) { 575 this.#data.max_values = max 576 return this 577 } 578 setRequired(required = true) { 579 this.#data.required = required 580 return this 581 } 582 toJSON() { 583 return { ...this.#data } 584 } 585 } 586 const actionRow = () => new ActionRowBuilder() 587 const button = () => new ButtonBuilder() 588 const stringSelect = (customId) => new StringSelectMenuBuilder(customId) 589 const userSelect = (customId) => new UserSelectMenuBuilder(customId) 590 const roleSelect = (customId) => new RoleSelectMenuBuilder(customId) 591 const mentionableSelect = (customId) => new MentionableSelectMenuBuilder(customId) 592 const channelSelect = (customId) => new ChannelSelectMenuBuilder(customId) 593 const inputText = (customId) => new InputTextBuilder(customId) 594 const textDisplay = (content) => new TextDisplayBuilder(content) 595 const thumbnail = (url) => new ThumbnailBuilder(url) 596 const section = () => new SectionBuilder() 597 const mediaGallery = () => new MediaGalleryBuilder() 598 const file = (url) => new FileBuilder(url) 599 const separator = (divider = true) => new SeparatorBuilder(divider) 600 const container = () => new ContainerBuilder() 601 const label = (labelText) => new LabelBuilder(labelText) 602 const fileUpload = (customId) => new FileUploadBuilder(customId) 603 const ButtonStyles = ButtonStyle 604 const InputTextStyles = InputTextStyle 605 // #endregion 606 // #region src/sdk/embed.ts 607 var EmbedBuilder = class { 608 #embed 609 constructor(initial = {}) { 610 this.#embed = { ...initial } 611 } 612 setTitle(title) { 613 this.#embed.title = title 614 return this 615 } 616 setDescription(description) { 617 this.#embed.description = description 618 return this 619 } 620 setUrl(url) { 621 this.#embed.url = url 622 return this 623 } 624 setColor(color) { 625 this.#embed.color = color 626 return this 627 } 628 setTimestamp(timestamp) { 629 this.#embed.timestamp = timestamp 630 return this 631 } 632 setFooter(text, iconUrl) { 633 this.#embed.footer = { 634 text, 635 iconUrl 636 } 637 return this 638 } 639 setImage(url) { 640 this.#embed.image = { url } 641 return this 642 } 643 setThumbnail(url) { 644 this.#embed.thumbnail = { url } 645 return this 646 } 647 setAuthor(name, options) { 648 this.#embed.author = { 649 name, 650 ...options 651 } 652 return this 653 } 654 addField(name, value, inline = false) { 655 const field = { 656 name, 657 value, 658 inline 659 } 660 this.#embed.fields = [...this.#embed.fields ?? [], field] 661 return this 662 } 663 addFields(fields) { 664 this.#embed.fields = [...this.#embed.fields ?? [], ...fields] 665 return this 666 } 667 setFields(fields) { 668 this.#embed.fields = [...fields] 669 return this 670 } 671 toJSON() { 672 return { ...this.#embed } 673 } 674 } 675 function embed(initial) { 676 return new EmbedBuilder(initial) 677 } 678 // #endregion 679 // #region src/sdk/helpers.ts 680 function hasRole(ctx, roleId) { 681 return ctx.msg.member?.roles?.includes(roleId) ?? false 682 } 683 function getSubcommand(ctx) { 684 const rawData = ctx.msg.data 685 if (!rawData?.options || !Array.isArray(rawData.options)) return void 0 686 return rawData.options[0]?.name 687 } 688 function getSubcommandGroup(ctx) { 689 const rawData = ctx.msg.data 690 if (!rawData?.options || !Array.isArray(rawData.options)) return void 0 691 const firstOption = rawData.options[0] 692 if (!firstOption) return void 0 693 if (firstOption.type === 2) return firstOption.name 694 } 695 // #endregion 696 // #region src/sdk/kv.ts 697 var KvStore = class { 698 #storeName 699 constructor(storeName) { 700 this.#storeName = storeName 701 } 702 /** 703 * Get a value from the store. 704 * 705 * @param key - The key to retrieve 706 * @returns The value, or null if not found 707 */ 708 async get(key) { 709 return await Deno.core.ops.op_kv_get(this.#storeName, key) 710 } 711 /** 712 * Get a value from the store along with its metadata. 713 * 714 * @param key - The key to retrieve 715 * @returns Object with value and optional metadata 716 */ 717 async getWithMetadata(key) { 718 const result = await Deno.core.ops.op_kv_get_with_metadata(this.#storeName, key) 719 if (result === null) return { value: null } 720 const [value, metadata] = result 721 return { 722 value, 723 metadata: metadata?.metadata 724 } 725 } 726 /** 727 * Set a value in the store. 728 * 729 * The value size is limited to 1MB. 730 * 731 * @param key - The key to set 732 * @param value - The value to store (max 1MB) 733 * @param options - Optional expiration (Unix timestamp) and metadata 734 */ 735 async set(key, value, options) { 736 await Deno.core.ops.op_kv_set(this.#storeName, key, value, { 737 expiration: options?.expiration ?? void 0, 738 metadata: options?.metadata ?? void 0 739 }) 740 } 741 /** 742 * Update just the metadata for a key without changing the value. 743 * 744 * @param key - The key to update 745 * @param metadata - The metadata to set, or null to remove metadata 746 */ 747 async updateMetadata(key, metadata) { 748 await Deno.core.ops.op_kv_update_metadata(this.#storeName, key, metadata ?? void 0) 749 } 750 /** 751 * Delete a key from the store. 752 * 753 * @param key - The key to delete 754 */ 755 async delete(key) { 756 await Deno.core.ops.op_kv_delete(this.#storeName, key) 757 } 758 /** 759 * List all keys in the store with cursor-based pagination. 760 * 761 * @param options - Optional prefix filter, limit (default 100, max 1000), and cursor for pagination 762 * @returns Paginated result with keys, list_complete flag, and cursor for next page 763 */ 764 async list(options) { 765 return await Deno.core.ops.op_kv_list_keys({ 766 prefix: options?.prefix ?? void 0, 767 limit: options?.limit ?? void 0, 768 cursor: options?.cursor ?? void 0 769 }, this.#storeName) 770 } 771 } 772 function store(name) { 773 return new KvStore(name) 774 } 775 const kv = { store } 776 // #endregion 777 // #region src/sdk/rest.ts 778 const ops = Deno.core.ops 779 /** 780 * Lightweight REST bindings over core ops. 781 * Errors include a `code` field (e.g. DISCORD_RATE_LIMITED). 782 */ 783 const rest = { 784 sendMessage: (args) => ops.op_send_message(args), 785 editMessage: (args) => ops.op_edit_message(args), 786 deleteMessage: (args) => ops.op_delete_message(args), 787 bulkDeleteMessages: (args) => ops.op_bulk_delete_messages(args), 788 pinMessage: (args) => ops.op_pin_message(args), 789 unpinMessage: (args) => ops.op_unpin_message(args), 790 crosspostMessage: (args) => ops.op_crosspost_message(args), 791 fetchMessage: (args) => ops.op_fetch_message(args), 792 fetchMessages: (args) => ops.op_fetch_messages(args), 793 addReaction: (args) => ops.op_add_reaction(args), 794 removeReaction: (args) => ops.op_remove_reaction(args), 795 clearReactions: (args) => ops.op_clear_reactions(args), 796 sendInteractionResponse: (args) => ops.op_send_interaction_response(args), 797 deferInteractionResponse: (args) => ops.op_defer_interaction_response(args), 798 updateInteractionResponse: (args) => ops.op_update_interaction_response(args), 799 editOriginalInteractionResponse: (args) => ops.op_edit_original_interaction_response(args), 800 deleteOriginalInteractionResponse: (args) => ops.op_delete_original_interaction_response(args), 801 createFollowupMessage: (args) => ops.op_create_followup_message(args), 802 editFollowupMessage: (args) => ops.op_edit_followup_message(args), 803 deleteFollowupMessage: (args) => ops.op_delete_followup_message(args), 804 upsertGuildCommands: (args) => ops.op_upsert_guild_commands(args), 805 createGuildCommand: (args) => ops.op_create_guild_command(args), 806 editGuildCommand: (args) => ops.op_edit_guild_command(args), 807 deleteGuildCommand: (args) => ops.op_delete_guild_command(args), 808 getGuildCommands: (args) => ops.op_get_guild_commands(args), 809 getGuildCommand: (args) => ops.op_get_guild_command(args), 810 editGuildCommandPermissions: (args) => ops.op_edit_guild_command_permissions(args), 811 getGuildCommandsPermissions: (args) => ops.op_get_guild_commands_permissions(args), 812 getGuildCommandPermissions: (args) => ops.op_get_guild_command_permissions(args), 813 kickMember: (args) => ops.op_kick_member(args), 814 banMember: (args) => ops.op_ban_member(args), 815 unbanMember: (args) => ops.op_unban_member(args), 816 addMemberRole: (args) => ops.op_add_member_role(args), 817 removeMemberRole: (args) => ops.op_remove_member_role(args), 818 editMember: (args) => ops.op_edit_member(args), 819 editCurrentMember: (args) => ops.op_edit_current_member(args), 820 createChannel: (args) => ops.op_create_channel(args), 821 editChannel: (args) => ops.op_edit_channel(args), 822 deleteChannel: (args) => ops.op_delete_channel(args), 823 createThread: (args) => ops.op_create_thread(args), 824 createThreadFromMessage: (args) => ops.op_create_thread_from_message(args), 825 joinThread: (args) => ops.op_join_thread(args), 826 leaveThread: (args) => ops.op_leave_thread(args), 827 addThreadMember: (args) => ops.op_add_thread_member(args), 828 removeThreadMember: (args) => ops.op_remove_thread_member(args), 829 executeWebhook: (args) => ops.op_execute_webhook(args), 830 editWebhook: (args) => ops.op_edit_webhook(args), 831 deleteWebhook: (args) => ops.op_delete_webhook(args) 832 } 833 // #endregion 834 exports.ActionRowBuilder = ActionRowBuilder 835 exports.ButtonBuilder = ButtonBuilder 836 exports.ButtonStyle = ButtonStyle 837 exports.ButtonStyles = ButtonStyles 838 exports.ChannelSelectMenuBuilder = ChannelSelectMenuBuilder 839 exports.ComponentType = ComponentType 840 exports.ContainerBuilder = ContainerBuilder 841 exports.EmbedBuilder = EmbedBuilder 842 exports.FileBuilder = FileBuilder 843 exports.FileUploadBuilder = FileUploadBuilder 844 exports.InputTextBuilder = InputTextBuilder 845 exports.InputTextStyle = InputTextStyle 846 exports.InputTextStyles = InputTextStyles 847 exports.KvStore = KvStore 848 exports.LabelBuilder = LabelBuilder 849 exports.MediaGalleryBuilder = MediaGalleryBuilder 850 exports.MentionableSelectMenuBuilder = MentionableSelectMenuBuilder 851 exports.MessageFlags = MessageFlags 852 exports.RoleSelectMenuBuilder = RoleSelectMenuBuilder 853 exports.SectionBuilder = SectionBuilder 854 exports.SelectMenuBuilderBase = SelectMenuBuilderBase 855 exports.SeparatorBuilder = SeparatorBuilder 856 exports.StringSelectMenuBuilder = StringSelectMenuBuilder 857 exports.TextDisplayBuilder = TextDisplayBuilder 858 exports.ThumbnailBuilder = ThumbnailBuilder 859 exports.UserSelectMenuBuilder = UserSelectMenuBuilder 860 exports.actionRow = actionRow 861 exports.button = button 862 exports.channelSelect = channelSelect 863 exports.container = container 864 exports.createBot = createBot 865 exports.embed = embed 866 exports.file = file 867 exports.fileUpload = fileUpload 868 exports.flattenCommands = flattenCommands 869 exports.flattenInteractionOptions = flattenInteractionOptions 870 exports.getSubcommand = getSubcommand 871 exports.getSubcommandGroup = getSubcommandGroup 872 exports.handleSubcommand = handleSubcommand 873 exports.hasRole = hasRole 874 exports.inputText = inputText 875 exports.kv = kv 876 exports.label = label 877 exports.mediaGallery = mediaGallery 878 exports.mentionableSelect = mentionableSelect 879 exports.prefix = prefix 880 exports.rest = rest 881 exports.roleSelect = roleSelect 882 exports.section = section 883 exports.separator = separator 884 exports.slash = slash 885 exports.store = store 886 exports.stringSelect = stringSelect 887 exports.textDisplay = textDisplay 888 exports.thumbnail = thumbnail 889 exports.userSelect = userSelect 890 return exports 891})({}) 892;(function(global) { 893 if (!global.flora) return 894 global.actionRow = global.flora.actionRow 895 global.ActionRowBuilder = global.flora.ActionRowBuilder 896 global.button = global.flora.button 897 global.ButtonBuilder = global.flora.ButtonBuilder 898 global.ButtonStyle = global.flora.ButtonStyle 899 global.ButtonStyles = global.flora.ButtonStyles 900 global.channelSelect = global.flora.channelSelect 901 global.ChannelSelectMenuBuilder = global.flora.ChannelSelectMenuBuilder 902 global.ComponentType = global.flora.ComponentType 903 global.container = global.flora.container 904 global.ContainerBuilder = global.flora.ContainerBuilder 905 global.createBot = global.flora.createBot 906 global.embed = global.flora.embed 907 global.EmbedBuilder = global.flora.EmbedBuilder 908 global.file = global.flora.file 909 global.FileBuilder = global.flora.FileBuilder 910 global.fileUpload = global.flora.fileUpload 911 global.FileUploadBuilder = global.flora.FileUploadBuilder 912 global.flattenCommands = global.flora.flattenCommands 913 global.flattenInteractionOptions = global.flora.flattenInteractionOptions 914 global.getSubcommand = global.flora.getSubcommand 915 global.getSubcommandGroup = global.flora.getSubcommandGroup 916 global.handleSubcommand = global.flora.handleSubcommand 917 global.hasRole = global.flora.hasRole 918 global.inputText = global.flora.inputText 919 global.InputTextBuilder = global.flora.InputTextBuilder 920 global.InputTextStyle = global.flora.InputTextStyle 921 global.InputTextStyles = global.flora.InputTextStyles 922 global.kv = global.flora.kv 923 global.KvStore = global.flora.KvStore 924 global.label = global.flora.label 925 global.LabelBuilder = global.flora.LabelBuilder 926 global.mediaGallery = global.flora.mediaGallery 927 global.MediaGalleryBuilder = global.flora.MediaGalleryBuilder 928 global.mentionableSelect = global.flora.mentionableSelect 929 global.MentionableSelectMenuBuilder = global.flora.MentionableSelectMenuBuilder 930 global.MessageFlags = global.flora.MessageFlags 931 global.prefix = global.flora.prefix 932 global.rest = global.flora.rest 933 global.roleSelect = global.flora.roleSelect 934 global.RoleSelectMenuBuilder = global.flora.RoleSelectMenuBuilder 935 global.section = global.flora.section 936 global.SectionBuilder = global.flora.SectionBuilder 937 global.SelectMenuBuilderBase = global.flora.SelectMenuBuilderBase 938 global.separator = global.flora.separator 939 global.SeparatorBuilder = global.flora.SeparatorBuilder 940 global.slash = global.flora.slash 941 global.store = global.flora.store 942 global.stringSelect = global.flora.stringSelect 943 global.StringSelectMenuBuilder = global.flora.StringSelectMenuBuilder 944 global.textDisplay = global.flora.textDisplay 945 global.TextDisplayBuilder = global.flora.TextDisplayBuilder 946 global.thumbnail = global.flora.thumbnail 947 global.ThumbnailBuilder = global.flora.ThumbnailBuilder 948 global.userSelect = global.flora.userSelect 949 global.UserSelectMenuBuilder = global.flora.UserSelectMenuBuilder 950})(globalThis)