@sapphire/discord-utilities 3.5.1-next.fb147ec0 → 4.0.0-next.7bd080f8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +336 -166
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +269 -140
- package/dist/esm/index.d.mts +269 -140
- package/dist/esm/index.mjs +334 -167
- package/dist/esm/index.mjs.map +1 -1
- package/dist/iife/index.global.js +723 -825
- package/dist/iife/index.global.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -6,171 +6,6 @@ var __defProp = Object.defineProperty;
|
|
|
6
6
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
7
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
8
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9
|
-
var _InteractionOptionResolver = class _InteractionOptionResolver {
|
|
10
|
-
constructor(interaction) {
|
|
11
|
-
__publicField(this, "interaction");
|
|
12
|
-
/**
|
|
13
|
-
* The interaction options array
|
|
14
|
-
*/
|
|
15
|
-
__publicField(this, "data", null);
|
|
16
|
-
/**
|
|
17
|
-
* The interaction resolved data
|
|
18
|
-
*/
|
|
19
|
-
__publicField(this, "resolved", null);
|
|
20
|
-
/**
|
|
21
|
-
* Bottom-level options for the interaction
|
|
22
|
-
* If there is a subcommand (or subcommand and group), this represents the options for the subcommand.
|
|
23
|
-
*/
|
|
24
|
-
__publicField(this, "hoistedOptions", null);
|
|
25
|
-
/**
|
|
26
|
-
* The name of the subcommand group
|
|
27
|
-
*/
|
|
28
|
-
__publicField(this, "group", null);
|
|
29
|
-
/**
|
|
30
|
-
* The name of the subcommand
|
|
31
|
-
*/
|
|
32
|
-
__publicField(this, "subcommand", null);
|
|
33
|
-
this.interaction = interaction;
|
|
34
|
-
this.data = "options" in interaction.data ? interaction.data.options ?? null : null;
|
|
35
|
-
this.resolved = "resolved" in interaction.data ? interaction.data.resolved ?? null : null;
|
|
36
|
-
this.hoistedOptions = this.data;
|
|
37
|
-
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.SubcommandGroup) {
|
|
38
|
-
this.group = this.hoistedOptions[0].name;
|
|
39
|
-
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
40
|
-
}
|
|
41
|
-
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.Subcommand) {
|
|
42
|
-
this.subcommand = this.hoistedOptions[0].name;
|
|
43
|
-
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
get(name, required = false) {
|
|
47
|
-
const option = this.hoistedOptions?.find((opt) => opt.name === name);
|
|
48
|
-
if (!option) {
|
|
49
|
-
if (required) {
|
|
50
|
-
throw new Error(`Missing required option "${name}"`);
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return option;
|
|
55
|
-
}
|
|
56
|
-
getSubcommand(required = true) {
|
|
57
|
-
if (required && !this.subcommand) {
|
|
58
|
-
throw new Error("A subcommand was not selected");
|
|
59
|
-
}
|
|
60
|
-
return this.subcommand;
|
|
61
|
-
}
|
|
62
|
-
getSubcommandGroup(required = true) {
|
|
63
|
-
if (required && !this.group) {
|
|
64
|
-
throw new Error("A subcommand group was not selected");
|
|
65
|
-
}
|
|
66
|
-
return this.group;
|
|
67
|
-
}
|
|
68
|
-
getBoolean(name, required = false) {
|
|
69
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Boolean, required);
|
|
70
|
-
return option?.value ?? null;
|
|
71
|
-
}
|
|
72
|
-
getChannel(name, required = false) {
|
|
73
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Channel, required);
|
|
74
|
-
return option && this.resolved && "channels" in this.resolved ? this.resolved.channels?.[option.value] ?? null : null;
|
|
75
|
-
}
|
|
76
|
-
getString(name, required = false) {
|
|
77
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.String, required);
|
|
78
|
-
return option?.value ?? null;
|
|
79
|
-
}
|
|
80
|
-
getInteger(name, required = false) {
|
|
81
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Integer, required);
|
|
82
|
-
return option?.value ?? null;
|
|
83
|
-
}
|
|
84
|
-
getNumber(name, required = false) {
|
|
85
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Number, required);
|
|
86
|
-
return option?.value ?? null;
|
|
87
|
-
}
|
|
88
|
-
getUser(name, required = false) {
|
|
89
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.User, required);
|
|
90
|
-
return option && this.resolved && "users" in this.resolved ? this.resolved.users?.[option.value] ?? null : null;
|
|
91
|
-
}
|
|
92
|
-
getMember(name, required = false) {
|
|
93
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.User, required);
|
|
94
|
-
return option && this.resolved && "members" in this.resolved ? this.resolved.members?.[option.value] ?? null : null;
|
|
95
|
-
}
|
|
96
|
-
getRole(name, required = false) {
|
|
97
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Role, required);
|
|
98
|
-
return option && this.resolved && "roles" in this.resolved ? this.resolved.roles?.[option.value] ?? null : null;
|
|
99
|
-
}
|
|
100
|
-
getAttachment(name, required = false) {
|
|
101
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Attachment, required);
|
|
102
|
-
return option && this.resolved && "attachments" in this.resolved ? this.resolved.attachments?.[option.value] ?? null : null;
|
|
103
|
-
}
|
|
104
|
-
getMentionable(name, required = false) {
|
|
105
|
-
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Mentionable, required);
|
|
106
|
-
if (!option || !this.resolved) {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
if ("members" in this.resolved && this.resolved.members && option.value in this.resolved.members) {
|
|
110
|
-
return this.resolved.members[option.value] ?? null;
|
|
111
|
-
}
|
|
112
|
-
if ("users" in this.resolved && this.resolved.users && option.value in this.resolved.users) {
|
|
113
|
-
return this.resolved.users[option.value] ?? null;
|
|
114
|
-
}
|
|
115
|
-
if ("roles" in this.resolved && this.resolved.roles && option.value in this.resolved.roles) {
|
|
116
|
-
return this.resolved.roles[option.value] ?? null;
|
|
117
|
-
}
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Gets the target user for a context menu interaction
|
|
122
|
-
*/
|
|
123
|
-
getTargetUser() {
|
|
124
|
-
if (this.interaction.type !== v10.InteractionType.ApplicationCommand || this.interaction.data.type !== v10.ApplicationCommandType.User) {
|
|
125
|
-
throw new Error("This method can only be used on user context menu interactions");
|
|
126
|
-
}
|
|
127
|
-
return this.resolved.users[this.interaction.data.target_id];
|
|
128
|
-
}
|
|
129
|
-
getTargetMember(required = false) {
|
|
130
|
-
if (this.interaction.type !== v10.InteractionType.ApplicationCommand || this.interaction.data.type !== v10.ApplicationCommandType.User) {
|
|
131
|
-
throw new Error("This method can only be used on user context menu interactions");
|
|
132
|
-
}
|
|
133
|
-
const member = this.resolved.members?.[this.interaction.data.target_id] ?? null;
|
|
134
|
-
if (!member && required) {
|
|
135
|
-
throw new Error("Member data is not present");
|
|
136
|
-
}
|
|
137
|
-
return member;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Gets the target message for a context menu interaction
|
|
141
|
-
*/
|
|
142
|
-
getTargetMessage() {
|
|
143
|
-
if (this.interaction.type !== v10.InteractionType.ApplicationCommand || this.interaction.data.type !== v10.ApplicationCommandType.Message) {
|
|
144
|
-
throw new Error("This method can only be used on message context menu interactions");
|
|
145
|
-
}
|
|
146
|
-
return this.resolved.messages[this.interaction.data.target_id];
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Gets the focused option for an autocomplete interaction
|
|
150
|
-
*/
|
|
151
|
-
getFocusedOption() {
|
|
152
|
-
if (this.interaction.type !== v10.InteractionType.ApplicationCommandAutocomplete) {
|
|
153
|
-
throw new Error("This method can only be used on autocomplete interactions");
|
|
154
|
-
}
|
|
155
|
-
const focusedOption = this.hoistedOptions?.find((option2) => "focused" in option2 && option2.focused);
|
|
156
|
-
if (!focusedOption) {
|
|
157
|
-
throw new Error("No focused option for autocomplete interaction");
|
|
158
|
-
}
|
|
159
|
-
const { focused, ...option } = focusedOption;
|
|
160
|
-
return option;
|
|
161
|
-
}
|
|
162
|
-
getTypedOption(name, type, required) {
|
|
163
|
-
const option = this.get(name, required);
|
|
164
|
-
if (!option) {
|
|
165
|
-
return null;
|
|
166
|
-
} else if (option.type !== type) {
|
|
167
|
-
throw new Error(`Option with name "${name}" is not of the correct type`);
|
|
168
|
-
}
|
|
169
|
-
return option;
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
__name(_InteractionOptionResolver, "InteractionOptionResolver");
|
|
173
|
-
var InteractionOptionResolver = _InteractionOptionResolver;
|
|
174
9
|
|
|
175
10
|
// src/lib/limits.ts
|
|
176
11
|
var ChannelLimits = {
|
|
@@ -790,6 +625,338 @@ var TokenRegex = /(?<mfaToken>mfa\.[a-z0-9_-]{20,})|(?<basicToken>[a-z0-9_-]{23,
|
|
|
790
625
|
var UserOrMemberMentionRegex = /^<@!?(?<id>\d{17,20})>$/;
|
|
791
626
|
var WebSocketUrlRegex = /^wss?:\/\//;
|
|
792
627
|
var WebhookRegex = /(?<url>^https:\/\/(?:(?:canary|ptb).)?discord(?:app)?.com\/api(?:\/v\d+)?\/webhooks\/(?<id>\d+)\/(?<token>[\w-]+)\/?$)/;
|
|
628
|
+
var _AutocompleteInteractionOptionResolver = class _AutocompleteInteractionOptionResolver {
|
|
629
|
+
constructor(interaction) {
|
|
630
|
+
__publicField(this, "interaction");
|
|
631
|
+
/**
|
|
632
|
+
* The interaction options array
|
|
633
|
+
*/
|
|
634
|
+
__publicField(this, "data", null);
|
|
635
|
+
/**
|
|
636
|
+
* Bottom-level options for the interaction
|
|
637
|
+
* If there is a subcommand (or subcommand and group), this represents the options for the subcommand.
|
|
638
|
+
*/
|
|
639
|
+
__publicField(this, "hoistedOptions", null);
|
|
640
|
+
/**
|
|
641
|
+
* The name of the subcommand group
|
|
642
|
+
*/
|
|
643
|
+
__publicField(this, "group", null);
|
|
644
|
+
/**
|
|
645
|
+
* The name of the subcommand
|
|
646
|
+
*/
|
|
647
|
+
__publicField(this, "subcommand", null);
|
|
648
|
+
this.interaction = interaction;
|
|
649
|
+
this.data = "options" in interaction.data ? interaction.data.options ?? null : null;
|
|
650
|
+
this.hoistedOptions = this.data;
|
|
651
|
+
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.SubcommandGroup) {
|
|
652
|
+
this.group = this.hoistedOptions[0].name;
|
|
653
|
+
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
654
|
+
}
|
|
655
|
+
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.Subcommand) {
|
|
656
|
+
this.subcommand = this.hoistedOptions[0].name;
|
|
657
|
+
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
getSubcommand(required = true) {
|
|
661
|
+
if (required && !this.subcommand) {
|
|
662
|
+
throw new Error("A subcommand was not selected");
|
|
663
|
+
}
|
|
664
|
+
return this.subcommand;
|
|
665
|
+
}
|
|
666
|
+
getSubcommandGroup(required = true) {
|
|
667
|
+
if (required && !this.group) {
|
|
668
|
+
throw new Error("A subcommand group was not selected");
|
|
669
|
+
}
|
|
670
|
+
return this.group;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Gets the focused option for an autocomplete interaction
|
|
674
|
+
*/
|
|
675
|
+
getFocusedOption() {
|
|
676
|
+
if (this.interaction.type !== v10.InteractionType.ApplicationCommandAutocomplete) {
|
|
677
|
+
throw new Error("This method can only be used on autocomplete interactions");
|
|
678
|
+
}
|
|
679
|
+
const focusedOption = this.hoistedOptions?.find((option2) => "focused" in option2 && option2.focused);
|
|
680
|
+
if (!focusedOption) {
|
|
681
|
+
throw new Error("No focused option for autocomplete interaction");
|
|
682
|
+
}
|
|
683
|
+
const { focused, ...option } = focusedOption;
|
|
684
|
+
return option;
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
__name(_AutocompleteInteractionOptionResolver, "AutocompleteInteractionOptionResolver");
|
|
688
|
+
var AutocompleteInteractionOptionResolver = _AutocompleteInteractionOptionResolver;
|
|
689
|
+
var _ChatInputInteractionOptionResolver = class _ChatInputInteractionOptionResolver {
|
|
690
|
+
constructor(interaction) {
|
|
691
|
+
/**
|
|
692
|
+
* The interaction options array
|
|
693
|
+
*/
|
|
694
|
+
__publicField(this, "data", null);
|
|
695
|
+
/**
|
|
696
|
+
* The interaction resolved data
|
|
697
|
+
*/
|
|
698
|
+
__publicField(this, "resolved", null);
|
|
699
|
+
/**
|
|
700
|
+
* Bottom-level options for the interaction
|
|
701
|
+
* If there is a subcommand (or subcommand and group), this represents the options for the subcommand.
|
|
702
|
+
*/
|
|
703
|
+
__publicField(this, "hoistedOptions", null);
|
|
704
|
+
/**
|
|
705
|
+
* The name of the subcommand group
|
|
706
|
+
*/
|
|
707
|
+
__publicField(this, "group", null);
|
|
708
|
+
/**
|
|
709
|
+
* The name of the subcommand
|
|
710
|
+
*/
|
|
711
|
+
__publicField(this, "subcommand", null);
|
|
712
|
+
this.data = "options" in interaction.data ? interaction.data.options ?? null : null;
|
|
713
|
+
this.resolved = "resolved" in interaction.data ? interaction.data.resolved ?? null : null;
|
|
714
|
+
this.hoistedOptions = this.data;
|
|
715
|
+
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.SubcommandGroup) {
|
|
716
|
+
this.group = this.hoistedOptions[0].name;
|
|
717
|
+
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
718
|
+
}
|
|
719
|
+
if (this.hoistedOptions?.[0]?.type === v10.ApplicationCommandOptionType.Subcommand) {
|
|
720
|
+
this.subcommand = this.hoistedOptions[0].name;
|
|
721
|
+
this.hoistedOptions = this.hoistedOptions[0].options ?? [];
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
get(name, required = false) {
|
|
725
|
+
const option = this.hoistedOptions?.find((opt) => opt.name === name);
|
|
726
|
+
if (!option) {
|
|
727
|
+
if (required) {
|
|
728
|
+
throw new Error(`Missing required option "${name}"`);
|
|
729
|
+
}
|
|
730
|
+
return null;
|
|
731
|
+
}
|
|
732
|
+
return option;
|
|
733
|
+
}
|
|
734
|
+
getSubcommand(required = true) {
|
|
735
|
+
if (required && !this.subcommand) {
|
|
736
|
+
throw new Error("A subcommand was not selected");
|
|
737
|
+
}
|
|
738
|
+
return this.subcommand;
|
|
739
|
+
}
|
|
740
|
+
getSubcommandGroup(required = true) {
|
|
741
|
+
if (required && !this.group) {
|
|
742
|
+
throw new Error("A subcommand group was not selected");
|
|
743
|
+
}
|
|
744
|
+
return this.group;
|
|
745
|
+
}
|
|
746
|
+
getBoolean(name, required = false) {
|
|
747
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Boolean, required);
|
|
748
|
+
return option?.value ?? null;
|
|
749
|
+
}
|
|
750
|
+
getChannel(name, required = false) {
|
|
751
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Channel, required);
|
|
752
|
+
return option && this.resolved && "channels" in this.resolved ? this.resolved.channels?.[option.value] ?? null : null;
|
|
753
|
+
}
|
|
754
|
+
getString(name, required = false) {
|
|
755
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.String, required);
|
|
756
|
+
return option?.value ?? null;
|
|
757
|
+
}
|
|
758
|
+
getInteger(name, required = false) {
|
|
759
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Integer, required);
|
|
760
|
+
return option?.value ?? null;
|
|
761
|
+
}
|
|
762
|
+
getNumber(name, required = false) {
|
|
763
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Number, required);
|
|
764
|
+
return option?.value ?? null;
|
|
765
|
+
}
|
|
766
|
+
getUser(name, required = false) {
|
|
767
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.User, required);
|
|
768
|
+
return option?.value ? this.resolved.users[option.value] : null;
|
|
769
|
+
}
|
|
770
|
+
getMember(name, required = false) {
|
|
771
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.User, required);
|
|
772
|
+
return option?.value ? this.resolved.members[option.value] : null;
|
|
773
|
+
}
|
|
774
|
+
getRole(name, required = false) {
|
|
775
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Role, required);
|
|
776
|
+
return option?.value ? this.resolved.roles[option.value] : null;
|
|
777
|
+
}
|
|
778
|
+
getAttachment(name, required = false) {
|
|
779
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Attachment, required);
|
|
780
|
+
return option?.value ? this.resolved.attachments[option.value] : null;
|
|
781
|
+
}
|
|
782
|
+
getMentionable(name, required = false) {
|
|
783
|
+
const option = this.getTypedOption(name, v10.ApplicationCommandOptionType.Mentionable, required);
|
|
784
|
+
if (!option || !this.resolved) {
|
|
785
|
+
return null;
|
|
786
|
+
}
|
|
787
|
+
if ("members" in this.resolved && this.resolved.members && option.value in this.resolved.members) {
|
|
788
|
+
return this.resolved.members[option.value] ?? null;
|
|
789
|
+
}
|
|
790
|
+
if ("users" in this.resolved && this.resolved.users && option.value in this.resolved.users) {
|
|
791
|
+
return this.resolved.users[option.value] ?? null;
|
|
792
|
+
}
|
|
793
|
+
if ("roles" in this.resolved && this.resolved.roles && option.value in this.resolved.roles) {
|
|
794
|
+
return this.resolved.roles[option.value] ?? null;
|
|
795
|
+
}
|
|
796
|
+
return null;
|
|
797
|
+
}
|
|
798
|
+
getTypedOption(name, type, required) {
|
|
799
|
+
const option = this.get(name, required);
|
|
800
|
+
if (!option) {
|
|
801
|
+
return null;
|
|
802
|
+
} else if (option.type !== type) {
|
|
803
|
+
throw new Error(`Option with name "${name}" is not of the correct type`);
|
|
804
|
+
}
|
|
805
|
+
return option;
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
__name(_ChatInputInteractionOptionResolver, "ChatInputInteractionOptionResolver");
|
|
809
|
+
var ChatInputInteractionOptionResolver = _ChatInputInteractionOptionResolver;
|
|
810
|
+
var _ContextMenuInteractionOptionResolver = class _ContextMenuInteractionOptionResolver {
|
|
811
|
+
constructor(interaction) {
|
|
812
|
+
__publicField(this, "interaction");
|
|
813
|
+
/**
|
|
814
|
+
* The interaction resolved data
|
|
815
|
+
*/
|
|
816
|
+
__publicField(this, "resolved", null);
|
|
817
|
+
this.interaction = interaction;
|
|
818
|
+
this.resolved = "resolved" in interaction.data ? interaction.data.resolved ?? null : null;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Gets the target user for a context menu interaction
|
|
822
|
+
*/
|
|
823
|
+
getTargetUser() {
|
|
824
|
+
if (this.interaction.data.type !== v10.ApplicationCommandType.User) {
|
|
825
|
+
throw new Error("This method can only be used on user context menu interactions");
|
|
826
|
+
}
|
|
827
|
+
return this.resolved.users[this.interaction.data.target_id];
|
|
828
|
+
}
|
|
829
|
+
getTargetMember(required = false) {
|
|
830
|
+
if (this.interaction.data.type !== v10.ApplicationCommandType.User) {
|
|
831
|
+
throw new Error("This method can only be used on user context menu interactions");
|
|
832
|
+
}
|
|
833
|
+
const member = this.resolved.members?.[this.interaction.data.target_id] ?? null;
|
|
834
|
+
if (!member && required) {
|
|
835
|
+
throw new Error("Member data is not present");
|
|
836
|
+
}
|
|
837
|
+
return member;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Gets the target message for a context menu interaction
|
|
841
|
+
*/
|
|
842
|
+
getTargetMessage() {
|
|
843
|
+
if (this.interaction.data.type !== v10.ApplicationCommandType.Message) {
|
|
844
|
+
throw new Error("This method can only be used on message context menu interactions");
|
|
845
|
+
}
|
|
846
|
+
return this.resolved.messages[this.interaction.data.target_id];
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
__name(_ContextMenuInteractionOptionResolver, "ContextMenuInteractionOptionResolver");
|
|
850
|
+
var ContextMenuInteractionOptionResolver = _ContextMenuInteractionOptionResolver;
|
|
851
|
+
var _ModalInteractionOptionResolver = class _ModalInteractionOptionResolver {
|
|
852
|
+
constructor(interaction) {
|
|
853
|
+
/**
|
|
854
|
+
* The interaction resolved data
|
|
855
|
+
*/
|
|
856
|
+
__publicField(this, "resolved", null);
|
|
857
|
+
/**
|
|
858
|
+
* Bottom-level components from the modal submission
|
|
859
|
+
*/
|
|
860
|
+
__publicField(this, "hoistedComponents");
|
|
861
|
+
this.resolved = "resolved" in interaction.data ? interaction.data.resolved ?? null : null;
|
|
862
|
+
this.hoistedComponents = interaction.data.components.flatMap((component) => {
|
|
863
|
+
if ("components" in component) {
|
|
864
|
+
return component.components;
|
|
865
|
+
}
|
|
866
|
+
if ("component" in component) {
|
|
867
|
+
return [component.component];
|
|
868
|
+
}
|
|
869
|
+
return [];
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Gets a component.
|
|
874
|
+
* @param customId The custom ID of the component to get.
|
|
875
|
+
*/
|
|
876
|
+
get(customId) {
|
|
877
|
+
const component = this.hoistedComponents.find((c) => c.custom_id === customId);
|
|
878
|
+
if (!component) {
|
|
879
|
+
throw new Error(`Component with custom ID "${customId}" not found.`);
|
|
880
|
+
}
|
|
881
|
+
return component;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Gets a text input component.
|
|
885
|
+
* @param customId The custom ID of the text input component to get.
|
|
886
|
+
*/
|
|
887
|
+
getTextInput(customId) {
|
|
888
|
+
return this.getTyped(customId, v10.ComponentType.TextInput).value;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Gets a string select component.
|
|
892
|
+
* @param customId The custom ID of the string select component to get.
|
|
893
|
+
*/
|
|
894
|
+
getSelectedStrings(customId) {
|
|
895
|
+
return this.getTyped(customId, v10.ComponentType.StringSelect).values;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Gets selected users.
|
|
899
|
+
* @param customId The custom ID of the user select component to get.
|
|
900
|
+
*/
|
|
901
|
+
getSelectedUsers(customId) {
|
|
902
|
+
const component = this.getTyped(customId, v10.ComponentType.UserSelect);
|
|
903
|
+
return component.values.map((userId) => this.resolved.users[userId]);
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Gets selected roles.
|
|
907
|
+
* @param customId The custom ID of the role select component to get.
|
|
908
|
+
*/
|
|
909
|
+
getSelectedRoles(customId) {
|
|
910
|
+
const component = this.getTyped(customId, v10.ComponentType.RoleSelect);
|
|
911
|
+
return component.values.map((roleId) => this.resolved.roles[roleId]);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Gets selected channels.
|
|
915
|
+
* @param customId The custom ID of the channel select component to get.
|
|
916
|
+
*/
|
|
917
|
+
getSelectedChannels(customId) {
|
|
918
|
+
const component = this.getTyped(customId, v10.ComponentType.ChannelSelect);
|
|
919
|
+
return component.values.map((channelId) => this.resolved.channels[channelId]);
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Gets selected members.
|
|
923
|
+
* @param customId The custom ID of the member select component to get.
|
|
924
|
+
*/
|
|
925
|
+
getSelectedMembers(customId) {
|
|
926
|
+
const component = this.getTyped(customId, v10.ComponentType.UserSelect);
|
|
927
|
+
return component.values.map((memberId) => this.resolved.members[memberId]);
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Gets selected mentionables.
|
|
931
|
+
* @param customId The custom ID of the mentionable select component to get.
|
|
932
|
+
*/
|
|
933
|
+
getSelectedMentionables(customId) {
|
|
934
|
+
const component = this.getTyped(customId, v10.ComponentType.MentionableSelect);
|
|
935
|
+
return component.values.map((id) => {
|
|
936
|
+
if (this.resolved.users && id in this.resolved.users) {
|
|
937
|
+
return this.resolved.users[id];
|
|
938
|
+
}
|
|
939
|
+
return this.resolved.roles[id];
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Gets attachments.
|
|
944
|
+
* @param customId The custom ID of the file upload component to get.
|
|
945
|
+
*/
|
|
946
|
+
getAttachments(customId) {
|
|
947
|
+
const component = this.getTyped(customId, v10.ComponentType.FileUpload);
|
|
948
|
+
return component.values.map((id) => this.resolved.attachments[id]);
|
|
949
|
+
}
|
|
950
|
+
getTyped(customId, allowedType) {
|
|
951
|
+
const component = this.get(customId);
|
|
952
|
+
if (component.type !== allowedType) {
|
|
953
|
+
throw new Error(`Component with custom ID "${customId}" is not one of the allowed type: ${allowedType}.`);
|
|
954
|
+
}
|
|
955
|
+
return component;
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
__name(_ModalInteractionOptionResolver, "ModalInteractionOptionResolver");
|
|
959
|
+
var ModalInteractionOptionResolver = _ModalInteractionOptionResolver;
|
|
793
960
|
|
|
794
961
|
// src/lib/TwemojiRegex.ts
|
|
795
962
|
var TwemojiRegex = /(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude89\ude8f-\udec2\udec6\udece-\udedc\udedf-\udee9]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g;
|
|
@@ -806,11 +973,14 @@ exports.ApplicationCommandPermissionLimits = ApplicationCommandPermissionLimits;
|
|
|
806
973
|
exports.ApplicationRoleConnectionLimits = ApplicationRoleConnectionLimits;
|
|
807
974
|
exports.AutoCompleteLimits = AutoCompleteLimits;
|
|
808
975
|
exports.AutoModerationRuleLimits = AutoModerationRuleLimits;
|
|
976
|
+
exports.AutocompleteInteractionOptionResolver = AutocompleteInteractionOptionResolver;
|
|
809
977
|
exports.ButtonLimits = ButtonLimits;
|
|
810
978
|
exports.ChannelInviteLimits = ChannelInviteLimits;
|
|
811
979
|
exports.ChannelLimits = ChannelLimits;
|
|
812
980
|
exports.ChannelMentionRegex = ChannelMentionRegex;
|
|
813
981
|
exports.ChannelMessageRegex = ChannelMessageRegex;
|
|
982
|
+
exports.ChatInputInteractionOptionResolver = ChatInputInteractionOptionResolver;
|
|
983
|
+
exports.ContextMenuInteractionOptionResolver = ContextMenuInteractionOptionResolver;
|
|
814
984
|
exports.DiscordHostnameRegex = DiscordHostnameRegex;
|
|
815
985
|
exports.DiscordInviteLinkRegex = DiscordInviteLinkRegex;
|
|
816
986
|
exports.EmbedLimits = EmbedLimits;
|
|
@@ -826,9 +996,9 @@ exports.GuildMemberLimits = GuildMemberLimits;
|
|
|
826
996
|
exports.GuildScheduledEventLimits = GuildScheduledEventLimits;
|
|
827
997
|
exports.HttpUrlRegex = HttpUrlRegex;
|
|
828
998
|
exports.InteractionLimits = InteractionLimits;
|
|
829
|
-
exports.InteractionOptionResolver = InteractionOptionResolver;
|
|
830
999
|
exports.MessageLimits = MessageLimits;
|
|
831
1000
|
exports.MessageLinkRegex = MessageLinkRegex;
|
|
1001
|
+
exports.ModalInteractionOptionResolver = ModalInteractionOptionResolver;
|
|
832
1002
|
exports.ModalLimits = ModalLimits;
|
|
833
1003
|
exports.ModerationLimits = ModerationLimits;
|
|
834
1004
|
exports.ParsedCustomEmoji = ParsedCustomEmoji;
|