nexocord 1.1.0 → 1.2.0
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/bin/cli.js +6 -6
- package/dist/core/types/Ui.d.ts +12 -92
- package/dist/core/types/Ui.d.ts.map +1 -1
- package/dist/core/types/index.js +1241 -362
- package/dist/core/ui/builders/container.d.ts +44 -0
- package/dist/core/ui/builders/container.d.ts.map +1 -0
- package/dist/core/ui/builders/index.d.ts +41 -0
- package/dist/core/ui/builders/index.d.ts.map +1 -0
- package/dist/core/ui/builders/primitives.d.ts +134 -0
- package/dist/core/ui/builders/primitives.d.ts.map +1 -0
- package/dist/core/ui/builders/select.d.ts +61 -0
- package/dist/core/ui/builders/select.d.ts.map +1 -0
- package/dist/core/ui/constants/index.d.ts +4 -0
- package/dist/core/ui/constants/index.d.ts.map +1 -0
- package/dist/core/ui/constants/limits.d.ts +19 -0
- package/dist/core/ui/constants/limits.d.ts.map +1 -0
- package/dist/core/ui/constants/patterns.d.ts +7 -0
- package/dist/core/ui/constants/patterns.d.ts.map +1 -0
- package/dist/core/ui/constants/symbols.d.ts +7 -0
- package/dist/core/ui/constants/symbols.d.ts.map +1 -0
- package/dist/core/ui/index.d.ts +4 -2
- package/dist/core/ui/index.d.ts.map +1 -1
- package/dist/core/ui/index.js +1792 -711
- package/dist/core/ui/normalizers/button.d.ts +25 -0
- package/dist/core/ui/normalizers/button.d.ts.map +1 -0
- package/dist/core/ui/normalizers/container.d.ts +68 -0
- package/dist/core/ui/normalizers/container.d.ts.map +1 -0
- package/dist/core/ui/normalizers/index.d.ts +6 -0
- package/dist/core/ui/normalizers/index.d.ts.map +1 -0
- package/dist/core/ui/normalizers/media.d.ts +17 -0
- package/dist/core/ui/normalizers/media.d.ts.map +1 -0
- package/dist/core/ui/normalizers/select.d.ts +45 -0
- package/dist/core/ui/normalizers/select.d.ts.map +1 -0
- package/dist/core/ui/types/button.d.ts +11 -0
- package/dist/core/ui/types/button.d.ts.map +1 -0
- package/dist/core/ui/types/container.d.ts +53 -0
- package/dist/core/ui/types/container.d.ts.map +1 -0
- package/dist/core/ui/types/index.d.ts +8 -0
- package/dist/core/ui/types/index.d.ts.map +1 -0
- package/dist/core/ui/types/media.d.ts +29 -0
- package/dist/core/ui/types/media.d.ts.map +1 -0
- package/dist/core/ui/types/message.d.ts +15 -0
- package/dist/core/ui/types/message.d.ts.map +1 -0
- package/dist/core/ui/types/render.d.ts +7 -0
- package/dist/core/ui/types/render.d.ts.map +1 -0
- package/dist/core/ui/types/row.d.ts +10 -0
- package/dist/core/ui/types/row.d.ts.map +1 -0
- package/dist/core/ui/types/select.d.ts +42 -0
- package/dist/core/ui/types/select.d.ts.map +1 -0
- package/dist/core/ui/utils/applySelectBase.d.ts +21 -0
- package/dist/core/ui/utils/applySelectBase.d.ts.map +1 -0
- package/dist/core/ui/utils/formatList.d.ts +12 -0
- package/dist/core/ui/utils/formatList.d.ts.map +1 -0
- package/dist/core/ui/utils/formatText.d.ts +46 -0
- package/dist/core/ui/utils/formatText.d.ts.map +1 -0
- package/dist/core/ui/utils/getAttachmentName.d.ts +8 -0
- package/dist/core/ui/utils/getAttachmentName.d.ts.map +1 -0
- package/dist/core/ui/utils/index.d.ts +7 -0
- package/dist/core/ui/utils/index.d.ts.map +1 -0
- package/dist/core/ui/utils/resolveSelectBase.d.ts +16 -0
- package/dist/core/ui/utils/resolveSelectBase.d.ts.map +1 -0
- package/dist/core/ui/utils/splitContainerArgs.d.ts +12 -0
- package/dist/core/ui/utils/splitContainerArgs.d.ts.map +1 -0
- package/dist/core/ui/validators/button.d.ts +8 -0
- package/dist/core/ui/validators/button.d.ts.map +1 -0
- package/dist/core/ui/validators/container.d.ts +51 -0
- package/dist/core/ui/validators/container.d.ts.map +1 -0
- package/dist/core/ui/validators/index.d.ts +18 -0
- package/dist/core/ui/validators/index.d.ts.map +1 -0
- package/dist/core/ui/validators/select.d.ts +8 -0
- package/dist/core/ui/validators/select.d.ts.map +1 -0
- package/dist/create/generator.d.ts.map +1 -1
- package/dist/index.cjs +2099 -869
- package/dist/index.js +2135 -905
- package/package.json +2 -2
- package/dist/commands/create/index.d.ts +0 -4
- package/dist/commands/create/index.d.ts.map +0 -1
- package/dist/commands/create/index.js +0 -867
- package/dist/commands/create/prompts.d.ts +0 -46
- package/dist/commands/create/prompts.d.ts.map +0 -1
- package/dist/commands/create/prompts.js +0 -105
- package/dist/commands/create/template.d.ts +0 -23
- package/dist/commands/create/template.d.ts.map +0 -1
- package/dist/commands/create/template.js +0 -762
- package/dist/commands/create/utils.d.ts +0 -45
- package/dist/commands/create/utils.d.ts.map +0 -1
- package/dist/commands/create/utils.js +0 -119
- package/dist/core/ui/builders.d.ts +0 -87
- package/dist/core/ui/builders.d.ts.map +0 -1
- package/dist/core/ui/normalize.d.ts +0 -17
- package/dist/core/ui/normalize.d.ts.map +0 -1
- package/dist/core/ui/validate.d.ts +0 -14
- package/dist/core/ui/validate.d.ts.map +0 -1
package/dist/core/types/index.js
CHANGED
|
@@ -849,13 +849,20 @@ var require_symbols = __commonJS((exports, module) => {
|
|
|
849
849
|
|
|
850
850
|
// node_modules/undici/lib/core/errors.js
|
|
851
851
|
var require_errors = __commonJS((exports, module) => {
|
|
852
|
+
var kUndiciError = Symbol.for("undici.error.UND_ERR");
|
|
853
|
+
|
|
852
854
|
class UndiciError extends Error {
|
|
853
855
|
constructor(message) {
|
|
854
856
|
super(message);
|
|
855
857
|
this.name = "UndiciError";
|
|
856
858
|
this.code = "UND_ERR";
|
|
857
859
|
}
|
|
860
|
+
static [Symbol.hasInstance](instance) {
|
|
861
|
+
return instance && instance[kUndiciError] === true;
|
|
862
|
+
}
|
|
863
|
+
[kUndiciError] = true;
|
|
858
864
|
}
|
|
865
|
+
var kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT");
|
|
859
866
|
|
|
860
867
|
class ConnectTimeoutError extends UndiciError {
|
|
861
868
|
constructor(message) {
|
|
@@ -864,7 +871,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
864
871
|
this.message = message || "Connect Timeout Error";
|
|
865
872
|
this.code = "UND_ERR_CONNECT_TIMEOUT";
|
|
866
873
|
}
|
|
874
|
+
static [Symbol.hasInstance](instance) {
|
|
875
|
+
return instance && instance[kConnectTimeoutError] === true;
|
|
876
|
+
}
|
|
877
|
+
[kConnectTimeoutError] = true;
|
|
867
878
|
}
|
|
879
|
+
var kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT");
|
|
868
880
|
|
|
869
881
|
class HeadersTimeoutError extends UndiciError {
|
|
870
882
|
constructor(message) {
|
|
@@ -873,7 +885,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
873
885
|
this.message = message || "Headers Timeout Error";
|
|
874
886
|
this.code = "UND_ERR_HEADERS_TIMEOUT";
|
|
875
887
|
}
|
|
888
|
+
static [Symbol.hasInstance](instance) {
|
|
889
|
+
return instance && instance[kHeadersTimeoutError] === true;
|
|
890
|
+
}
|
|
891
|
+
[kHeadersTimeoutError] = true;
|
|
876
892
|
}
|
|
893
|
+
var kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW");
|
|
877
894
|
|
|
878
895
|
class HeadersOverflowError extends UndiciError {
|
|
879
896
|
constructor(message) {
|
|
@@ -882,7 +899,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
882
899
|
this.message = message || "Headers Overflow Error";
|
|
883
900
|
this.code = "UND_ERR_HEADERS_OVERFLOW";
|
|
884
901
|
}
|
|
902
|
+
static [Symbol.hasInstance](instance) {
|
|
903
|
+
return instance && instance[kHeadersOverflowError] === true;
|
|
904
|
+
}
|
|
905
|
+
[kHeadersOverflowError] = true;
|
|
885
906
|
}
|
|
907
|
+
var kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT");
|
|
886
908
|
|
|
887
909
|
class BodyTimeoutError extends UndiciError {
|
|
888
910
|
constructor(message) {
|
|
@@ -891,7 +913,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
891
913
|
this.message = message || "Body Timeout Error";
|
|
892
914
|
this.code = "UND_ERR_BODY_TIMEOUT";
|
|
893
915
|
}
|
|
916
|
+
static [Symbol.hasInstance](instance) {
|
|
917
|
+
return instance && instance[kBodyTimeoutError] === true;
|
|
918
|
+
}
|
|
919
|
+
[kBodyTimeoutError] = true;
|
|
894
920
|
}
|
|
921
|
+
var kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE");
|
|
895
922
|
|
|
896
923
|
class ResponseStatusCodeError extends UndiciError {
|
|
897
924
|
constructor(message, statusCode, headers, body) {
|
|
@@ -904,7 +931,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
904
931
|
this.statusCode = statusCode;
|
|
905
932
|
this.headers = headers;
|
|
906
933
|
}
|
|
934
|
+
static [Symbol.hasInstance](instance) {
|
|
935
|
+
return instance && instance[kResponseStatusCodeError] === true;
|
|
936
|
+
}
|
|
937
|
+
[kResponseStatusCodeError] = true;
|
|
907
938
|
}
|
|
939
|
+
var kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG");
|
|
908
940
|
|
|
909
941
|
class InvalidArgumentError extends UndiciError {
|
|
910
942
|
constructor(message) {
|
|
@@ -913,7 +945,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
913
945
|
this.message = message || "Invalid Argument Error";
|
|
914
946
|
this.code = "UND_ERR_INVALID_ARG";
|
|
915
947
|
}
|
|
948
|
+
static [Symbol.hasInstance](instance) {
|
|
949
|
+
return instance && instance[kInvalidArgumentError] === true;
|
|
950
|
+
}
|
|
951
|
+
[kInvalidArgumentError] = true;
|
|
916
952
|
}
|
|
953
|
+
var kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE");
|
|
917
954
|
|
|
918
955
|
class InvalidReturnValueError extends UndiciError {
|
|
919
956
|
constructor(message) {
|
|
@@ -922,15 +959,26 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
922
959
|
this.message = message || "Invalid Return Value Error";
|
|
923
960
|
this.code = "UND_ERR_INVALID_RETURN_VALUE";
|
|
924
961
|
}
|
|
962
|
+
static [Symbol.hasInstance](instance) {
|
|
963
|
+
return instance && instance[kInvalidReturnValueError] === true;
|
|
964
|
+
}
|
|
965
|
+
[kInvalidReturnValueError] = true;
|
|
925
966
|
}
|
|
967
|
+
var kAbortError = Symbol.for("undici.error.UND_ERR_ABORT");
|
|
926
968
|
|
|
927
969
|
class AbortError extends UndiciError {
|
|
928
970
|
constructor(message) {
|
|
929
971
|
super(message);
|
|
930
972
|
this.name = "AbortError";
|
|
931
973
|
this.message = message || "The operation was aborted";
|
|
974
|
+
this.code = "UND_ERR_ABORT";
|
|
932
975
|
}
|
|
976
|
+
static [Symbol.hasInstance](instance) {
|
|
977
|
+
return instance && instance[kAbortError] === true;
|
|
978
|
+
}
|
|
979
|
+
[kAbortError] = true;
|
|
933
980
|
}
|
|
981
|
+
var kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED");
|
|
934
982
|
|
|
935
983
|
class RequestAbortedError extends AbortError {
|
|
936
984
|
constructor(message) {
|
|
@@ -939,7 +987,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
939
987
|
this.message = message || "Request aborted";
|
|
940
988
|
this.code = "UND_ERR_ABORTED";
|
|
941
989
|
}
|
|
990
|
+
static [Symbol.hasInstance](instance) {
|
|
991
|
+
return instance && instance[kRequestAbortedError] === true;
|
|
992
|
+
}
|
|
993
|
+
[kRequestAbortedError] = true;
|
|
942
994
|
}
|
|
995
|
+
var kInformationalError = Symbol.for("undici.error.UND_ERR_INFO");
|
|
943
996
|
|
|
944
997
|
class InformationalError extends UndiciError {
|
|
945
998
|
constructor(message) {
|
|
@@ -948,7 +1001,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
948
1001
|
this.message = message || "Request information";
|
|
949
1002
|
this.code = "UND_ERR_INFO";
|
|
950
1003
|
}
|
|
1004
|
+
static [Symbol.hasInstance](instance) {
|
|
1005
|
+
return instance && instance[kInformationalError] === true;
|
|
1006
|
+
}
|
|
1007
|
+
[kInformationalError] = true;
|
|
951
1008
|
}
|
|
1009
|
+
var kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH");
|
|
952
1010
|
|
|
953
1011
|
class RequestContentLengthMismatchError extends UndiciError {
|
|
954
1012
|
constructor(message) {
|
|
@@ -957,7 +1015,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
957
1015
|
this.message = message || "Request body length does not match content-length header";
|
|
958
1016
|
this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH";
|
|
959
1017
|
}
|
|
1018
|
+
static [Symbol.hasInstance](instance) {
|
|
1019
|
+
return instance && instance[kRequestContentLengthMismatchError] === true;
|
|
1020
|
+
}
|
|
1021
|
+
[kRequestContentLengthMismatchError] = true;
|
|
960
1022
|
}
|
|
1023
|
+
var kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH");
|
|
961
1024
|
|
|
962
1025
|
class ResponseContentLengthMismatchError extends UndiciError {
|
|
963
1026
|
constructor(message) {
|
|
@@ -966,7 +1029,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
966
1029
|
this.message = message || "Response body length does not match content-length header";
|
|
967
1030
|
this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH";
|
|
968
1031
|
}
|
|
1032
|
+
static [Symbol.hasInstance](instance) {
|
|
1033
|
+
return instance && instance[kResponseContentLengthMismatchError] === true;
|
|
1034
|
+
}
|
|
1035
|
+
[kResponseContentLengthMismatchError] = true;
|
|
969
1036
|
}
|
|
1037
|
+
var kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED");
|
|
970
1038
|
|
|
971
1039
|
class ClientDestroyedError extends UndiciError {
|
|
972
1040
|
constructor(message) {
|
|
@@ -975,7 +1043,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
975
1043
|
this.message = message || "The client is destroyed";
|
|
976
1044
|
this.code = "UND_ERR_DESTROYED";
|
|
977
1045
|
}
|
|
1046
|
+
static [Symbol.hasInstance](instance) {
|
|
1047
|
+
return instance && instance[kClientDestroyedError] === true;
|
|
1048
|
+
}
|
|
1049
|
+
[kClientDestroyedError] = true;
|
|
978
1050
|
}
|
|
1051
|
+
var kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED");
|
|
979
1052
|
|
|
980
1053
|
class ClientClosedError extends UndiciError {
|
|
981
1054
|
constructor(message) {
|
|
@@ -984,7 +1057,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
984
1057
|
this.message = message || "The client is closed";
|
|
985
1058
|
this.code = "UND_ERR_CLOSED";
|
|
986
1059
|
}
|
|
1060
|
+
static [Symbol.hasInstance](instance) {
|
|
1061
|
+
return instance && instance[kClientClosedError] === true;
|
|
1062
|
+
}
|
|
1063
|
+
[kClientClosedError] = true;
|
|
987
1064
|
}
|
|
1065
|
+
var kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET");
|
|
988
1066
|
|
|
989
1067
|
class SocketError extends UndiciError {
|
|
990
1068
|
constructor(message, socket) {
|
|
@@ -994,7 +1072,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
994
1072
|
this.code = "UND_ERR_SOCKET";
|
|
995
1073
|
this.socket = socket;
|
|
996
1074
|
}
|
|
1075
|
+
static [Symbol.hasInstance](instance) {
|
|
1076
|
+
return instance && instance[kSocketError] === true;
|
|
1077
|
+
}
|
|
1078
|
+
[kSocketError] = true;
|
|
997
1079
|
}
|
|
1080
|
+
var kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED");
|
|
998
1081
|
|
|
999
1082
|
class NotSupportedError extends UndiciError {
|
|
1000
1083
|
constructor(message) {
|
|
@@ -1003,7 +1086,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1003
1086
|
this.message = message || "Not supported error";
|
|
1004
1087
|
this.code = "UND_ERR_NOT_SUPPORTED";
|
|
1005
1088
|
}
|
|
1089
|
+
static [Symbol.hasInstance](instance) {
|
|
1090
|
+
return instance && instance[kNotSupportedError] === true;
|
|
1091
|
+
}
|
|
1092
|
+
[kNotSupportedError] = true;
|
|
1006
1093
|
}
|
|
1094
|
+
var kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM");
|
|
1007
1095
|
|
|
1008
1096
|
class BalancedPoolMissingUpstreamError extends UndiciError {
|
|
1009
1097
|
constructor(message) {
|
|
@@ -1012,7 +1100,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1012
1100
|
this.message = message || "No upstream has been added to the BalancedPool";
|
|
1013
1101
|
this.code = "UND_ERR_BPL_MISSING_UPSTREAM";
|
|
1014
1102
|
}
|
|
1103
|
+
static [Symbol.hasInstance](instance) {
|
|
1104
|
+
return instance && instance[kBalancedPoolMissingUpstreamError] === true;
|
|
1105
|
+
}
|
|
1106
|
+
[kBalancedPoolMissingUpstreamError] = true;
|
|
1015
1107
|
}
|
|
1108
|
+
var kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER");
|
|
1016
1109
|
|
|
1017
1110
|
class HTTPParserError extends Error {
|
|
1018
1111
|
constructor(message, code, data) {
|
|
@@ -1021,7 +1114,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1021
1114
|
this.code = code ? `HPE_${code}` : undefined;
|
|
1022
1115
|
this.data = data ? data.toString() : undefined;
|
|
1023
1116
|
}
|
|
1117
|
+
static [Symbol.hasInstance](instance) {
|
|
1118
|
+
return instance && instance[kHTTPParserError] === true;
|
|
1119
|
+
}
|
|
1120
|
+
[kHTTPParserError] = true;
|
|
1024
1121
|
}
|
|
1122
|
+
var kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE");
|
|
1025
1123
|
|
|
1026
1124
|
class ResponseExceededMaxSizeError extends UndiciError {
|
|
1027
1125
|
constructor(message) {
|
|
@@ -1030,7 +1128,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1030
1128
|
this.message = message || "Response content exceeded max size";
|
|
1031
1129
|
this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE";
|
|
1032
1130
|
}
|
|
1131
|
+
static [Symbol.hasInstance](instance) {
|
|
1132
|
+
return instance && instance[kResponseExceededMaxSizeError] === true;
|
|
1133
|
+
}
|
|
1134
|
+
[kResponseExceededMaxSizeError] = true;
|
|
1033
1135
|
}
|
|
1136
|
+
var kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY");
|
|
1034
1137
|
|
|
1035
1138
|
class RequestRetryError extends UndiciError {
|
|
1036
1139
|
constructor(message, code, { headers, data }) {
|
|
@@ -1042,7 +1145,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1042
1145
|
this.data = data;
|
|
1043
1146
|
this.headers = headers;
|
|
1044
1147
|
}
|
|
1148
|
+
static [Symbol.hasInstance](instance) {
|
|
1149
|
+
return instance && instance[kRequestRetryError] === true;
|
|
1150
|
+
}
|
|
1151
|
+
[kRequestRetryError] = true;
|
|
1045
1152
|
}
|
|
1153
|
+
var kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE");
|
|
1046
1154
|
|
|
1047
1155
|
class ResponseError extends UndiciError {
|
|
1048
1156
|
constructor(message, code, { headers, data }) {
|
|
@@ -1054,7 +1162,12 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1054
1162
|
this.data = data;
|
|
1055
1163
|
this.headers = headers;
|
|
1056
1164
|
}
|
|
1165
|
+
static [Symbol.hasInstance](instance) {
|
|
1166
|
+
return instance && instance[kResponseError] === true;
|
|
1167
|
+
}
|
|
1168
|
+
[kResponseError] = true;
|
|
1057
1169
|
}
|
|
1170
|
+
var kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS");
|
|
1058
1171
|
|
|
1059
1172
|
class SecureProxyConnectionError extends UndiciError {
|
|
1060
1173
|
constructor(cause, message, options) {
|
|
@@ -1064,6 +1177,26 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1064
1177
|
this.code = "UND_ERR_PRX_TLS";
|
|
1065
1178
|
this.cause = cause;
|
|
1066
1179
|
}
|
|
1180
|
+
static [Symbol.hasInstance](instance) {
|
|
1181
|
+
return instance && instance[kSecureProxyConnectionError] === true;
|
|
1182
|
+
}
|
|
1183
|
+
[kSecureProxyConnectionError] = true;
|
|
1184
|
+
}
|
|
1185
|
+
var kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED");
|
|
1186
|
+
|
|
1187
|
+
class MessageSizeExceededError extends UndiciError {
|
|
1188
|
+
constructor(message) {
|
|
1189
|
+
super(message);
|
|
1190
|
+
this.name = "MessageSizeExceededError";
|
|
1191
|
+
this.message = message || "Max decompressed message size exceeded";
|
|
1192
|
+
this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED";
|
|
1193
|
+
}
|
|
1194
|
+
static [Symbol.hasInstance](instance) {
|
|
1195
|
+
return instance && instance[kMessageSizeExceededError] === true;
|
|
1196
|
+
}
|
|
1197
|
+
get [kMessageSizeExceededError]() {
|
|
1198
|
+
return true;
|
|
1199
|
+
}
|
|
1067
1200
|
}
|
|
1068
1201
|
module.exports = {
|
|
1069
1202
|
AbortError,
|
|
@@ -1088,7 +1221,8 @@ var require_errors = __commonJS((exports, module) => {
|
|
|
1088
1221
|
ResponseExceededMaxSizeError,
|
|
1089
1222
|
RequestRetryError,
|
|
1090
1223
|
ResponseError,
|
|
1091
|
-
SecureProxyConnectionError
|
|
1224
|
+
SecureProxyConnectionError,
|
|
1225
|
+
MessageSizeExceededError
|
|
1092
1226
|
};
|
|
1093
1227
|
});
|
|
1094
1228
|
|
|
@@ -2005,6 +2139,9 @@ var require_request = __commonJS((exports, module) => {
|
|
|
2005
2139
|
if (upgrade && typeof upgrade !== "string") {
|
|
2006
2140
|
throw new InvalidArgumentError("upgrade must be a string");
|
|
2007
2141
|
}
|
|
2142
|
+
if (upgrade && !isValidHeaderValue(upgrade)) {
|
|
2143
|
+
throw new InvalidArgumentError("invalid upgrade header");
|
|
2144
|
+
}
|
|
2008
2145
|
if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {
|
|
2009
2146
|
throw new InvalidArgumentError("invalid headersTimeout");
|
|
2010
2147
|
}
|
|
@@ -2237,12 +2374,18 @@ var require_request = __commonJS((exports, module) => {
|
|
|
2237
2374
|
} else {
|
|
2238
2375
|
val = `${val}`;
|
|
2239
2376
|
}
|
|
2240
|
-
if (
|
|
2377
|
+
if (headerName === "host") {
|
|
2378
|
+
if (request.host !== null) {
|
|
2379
|
+
throw new InvalidArgumentError("duplicate host header");
|
|
2380
|
+
}
|
|
2241
2381
|
if (typeof val !== "string") {
|
|
2242
2382
|
throw new InvalidArgumentError("invalid host header");
|
|
2243
2383
|
}
|
|
2244
2384
|
request.host = val;
|
|
2245
|
-
} else if (
|
|
2385
|
+
} else if (headerName === "content-length") {
|
|
2386
|
+
if (request.contentLength !== null) {
|
|
2387
|
+
throw new InvalidArgumentError("duplicate content-length header");
|
|
2388
|
+
}
|
|
2246
2389
|
request.contentLength = parseInt(val, 10);
|
|
2247
2390
|
if (!Number.isFinite(request.contentLength)) {
|
|
2248
2391
|
throw new InvalidArgumentError("invalid content-length header");
|
|
@@ -5468,9 +5611,6 @@ ${normalizeLinefeeds(value)}\r
|
|
|
5468
5611
|
}
|
|
5469
5612
|
function cloneBody(instance, body) {
|
|
5470
5613
|
const [out1, out2] = body.stream.tee();
|
|
5471
|
-
if (hasFinalizationRegistry) {
|
|
5472
|
-
streamRegistry.register(instance, new WeakRef(out1));
|
|
5473
|
-
}
|
|
5474
5614
|
body.stream = out1;
|
|
5475
5615
|
return {
|
|
5476
5616
|
stream: out2,
|
|
@@ -8323,19 +8463,21 @@ var require_agent = __commonJS((exports, module) => {
|
|
|
8323
8463
|
|
|
8324
8464
|
// node_modules/undici/lib/dispatcher/proxy-agent.js
|
|
8325
8465
|
var require_proxy_agent = __commonJS((exports, module) => {
|
|
8326
|
-
var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols();
|
|
8466
|
+
var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols();
|
|
8327
8467
|
var { URL: URL2 } = __require("node:url");
|
|
8328
8468
|
var Agent = require_agent();
|
|
8329
8469
|
var Pool = require_pool();
|
|
8330
8470
|
var DispatcherBase = require_dispatcher_base();
|
|
8331
8471
|
var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors();
|
|
8332
8472
|
var buildConnector = require_connect();
|
|
8473
|
+
var Client2 = require_client();
|
|
8333
8474
|
var kAgent = Symbol("proxy agent");
|
|
8334
8475
|
var kClient = Symbol("proxy client");
|
|
8335
8476
|
var kProxyHeaders = Symbol("proxy headers");
|
|
8336
8477
|
var kRequestTls = Symbol("request tls settings");
|
|
8337
8478
|
var kProxyTls = Symbol("proxy tls settings");
|
|
8338
8479
|
var kConnectEndpoint = Symbol("connect endpoint function");
|
|
8480
|
+
var kTunnelProxy = Symbol("tunnel proxy");
|
|
8339
8481
|
function defaultProtocolPort(protocol) {
|
|
8340
8482
|
return protocol === "https:" ? 443 : 80;
|
|
8341
8483
|
}
|
|
@@ -8343,6 +8485,59 @@ var require_proxy_agent = __commonJS((exports, module) => {
|
|
|
8343
8485
|
return new Pool(origin, opts);
|
|
8344
8486
|
}
|
|
8345
8487
|
var noop = () => {};
|
|
8488
|
+
function defaultAgentFactory(origin, opts) {
|
|
8489
|
+
if (opts.connections === 1) {
|
|
8490
|
+
return new Client2(origin, opts);
|
|
8491
|
+
}
|
|
8492
|
+
return new Pool(origin, opts);
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8495
|
+
class Http1ProxyWrapper extends DispatcherBase {
|
|
8496
|
+
#client;
|
|
8497
|
+
constructor(proxyUrl, { headers = {}, connect, factory }) {
|
|
8498
|
+
super();
|
|
8499
|
+
if (!proxyUrl) {
|
|
8500
|
+
throw new InvalidArgumentError("Proxy URL is mandatory");
|
|
8501
|
+
}
|
|
8502
|
+
this[kProxyHeaders] = headers;
|
|
8503
|
+
if (factory) {
|
|
8504
|
+
this.#client = factory(proxyUrl, { connect });
|
|
8505
|
+
} else {
|
|
8506
|
+
this.#client = new Client2(proxyUrl, { connect });
|
|
8507
|
+
}
|
|
8508
|
+
}
|
|
8509
|
+
[kDispatch](opts, handler) {
|
|
8510
|
+
const onHeaders = handler.onHeaders;
|
|
8511
|
+
handler.onHeaders = function(statusCode, data, resume) {
|
|
8512
|
+
if (statusCode === 407) {
|
|
8513
|
+
if (typeof handler.onError === "function") {
|
|
8514
|
+
handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)"));
|
|
8515
|
+
}
|
|
8516
|
+
return;
|
|
8517
|
+
}
|
|
8518
|
+
if (onHeaders)
|
|
8519
|
+
onHeaders.call(this, statusCode, data, resume);
|
|
8520
|
+
};
|
|
8521
|
+
const {
|
|
8522
|
+
origin,
|
|
8523
|
+
path = "/",
|
|
8524
|
+
headers = {}
|
|
8525
|
+
} = opts;
|
|
8526
|
+
opts.path = origin + path;
|
|
8527
|
+
if (!("host" in headers) && !("Host" in headers)) {
|
|
8528
|
+
const { host } = new URL2(origin);
|
|
8529
|
+
headers.host = host;
|
|
8530
|
+
}
|
|
8531
|
+
opts.headers = { ...this[kProxyHeaders], ...headers };
|
|
8532
|
+
return this.#client[kDispatch](opts, handler);
|
|
8533
|
+
}
|
|
8534
|
+
async[kClose]() {
|
|
8535
|
+
return this.#client.close();
|
|
8536
|
+
}
|
|
8537
|
+
async[kDestroy](err) {
|
|
8538
|
+
return this.#client.destroy(err);
|
|
8539
|
+
}
|
|
8540
|
+
}
|
|
8346
8541
|
|
|
8347
8542
|
class ProxyAgent extends DispatcherBase {
|
|
8348
8543
|
constructor(opts) {
|
|
@@ -8354,6 +8549,7 @@ var require_proxy_agent = __commonJS((exports, module) => {
|
|
|
8354
8549
|
if (typeof clientFactory !== "function") {
|
|
8355
8550
|
throw new InvalidArgumentError("Proxy opts.clientFactory must be a function.");
|
|
8356
8551
|
}
|
|
8552
|
+
const { proxyTunnel = true } = opts;
|
|
8357
8553
|
const url = this.#getUrl(opts);
|
|
8358
8554
|
const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url;
|
|
8359
8555
|
this[kProxy] = { uri: href, protocol };
|
|
@@ -8361,6 +8557,7 @@ var require_proxy_agent = __commonJS((exports, module) => {
|
|
|
8361
8557
|
this[kRequestTls] = opts.requestTls;
|
|
8362
8558
|
this[kProxyTls] = opts.proxyTls;
|
|
8363
8559
|
this[kProxyHeaders] = opts.headers || {};
|
|
8560
|
+
this[kTunnelProxy] = proxyTunnel;
|
|
8364
8561
|
if (opts.auth && opts.token) {
|
|
8365
8562
|
throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token");
|
|
8366
8563
|
} else if (opts.auth) {
|
|
@@ -8372,9 +8569,22 @@ var require_proxy_agent = __commonJS((exports, module) => {
|
|
|
8372
8569
|
}
|
|
8373
8570
|
const connect = buildConnector({ ...opts.proxyTls });
|
|
8374
8571
|
this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
|
|
8572
|
+
const agentFactory = opts.factory || defaultAgentFactory;
|
|
8573
|
+
const factory = (origin2, options) => {
|
|
8574
|
+
const { protocol: protocol2 } = new URL2(origin2);
|
|
8575
|
+
if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") {
|
|
8576
|
+
return new Http1ProxyWrapper(this[kProxy].uri, {
|
|
8577
|
+
headers: this[kProxyHeaders],
|
|
8578
|
+
connect,
|
|
8579
|
+
factory: agentFactory
|
|
8580
|
+
});
|
|
8581
|
+
}
|
|
8582
|
+
return agentFactory(origin2, options);
|
|
8583
|
+
};
|
|
8375
8584
|
this[kClient] = clientFactory(url, { connect });
|
|
8376
8585
|
this[kAgent] = new Agent({
|
|
8377
8586
|
...opts,
|
|
8587
|
+
factory,
|
|
8378
8588
|
connect: async (opts2, callback) => {
|
|
8379
8589
|
let requestedPath = opts2.host;
|
|
8380
8590
|
if (!opts2.port) {
|
|
@@ -10014,6 +10224,7 @@ var require_api = __commonJS((exports, module) => {
|
|
|
10014
10224
|
// node_modules/undici/lib/mock/mock-errors.js
|
|
10015
10225
|
var require_mock_errors = __commonJS((exports, module) => {
|
|
10016
10226
|
var { UndiciError } = require_errors();
|
|
10227
|
+
var kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED");
|
|
10017
10228
|
|
|
10018
10229
|
class MockNotMatchedError extends UndiciError {
|
|
10019
10230
|
constructor(message) {
|
|
@@ -10023,6 +10234,10 @@ var require_mock_errors = __commonJS((exports, module) => {
|
|
|
10023
10234
|
this.message = message || "The request does not match any registered mock dispatches";
|
|
10024
10235
|
this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED";
|
|
10025
10236
|
}
|
|
10237
|
+
static [Symbol.hasInstance](instance) {
|
|
10238
|
+
return instance && instance[kMockNotMatchedError] === true;
|
|
10239
|
+
}
|
|
10240
|
+
[kMockNotMatchedError] = true;
|
|
10026
10241
|
}
|
|
10027
10242
|
module.exports = {
|
|
10028
10243
|
MockNotMatchedError
|
|
@@ -11754,6 +11969,9 @@ var require_response = __commonJS((exports, module) => {
|
|
|
11754
11969
|
});
|
|
11755
11970
|
}
|
|
11756
11971
|
const clonedResponse = cloneResponse(this[kState]);
|
|
11972
|
+
if (hasFinalizationRegistry && this[kState].body?.stream) {
|
|
11973
|
+
streamRegistry.register(this, new WeakRef(this[kState].body.stream));
|
|
11974
|
+
}
|
|
11757
11975
|
return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders]));
|
|
11758
11976
|
}
|
|
11759
11977
|
[nodeUtil.inspect.custom](depth, options) {
|
|
@@ -13338,7 +13556,7 @@ var require_fetch = __commonJS((exports, module) => {
|
|
|
13338
13556
|
request.cache = "no-store";
|
|
13339
13557
|
}
|
|
13340
13558
|
const newConnection = forceNewConnection ? "yes" : "no";
|
|
13341
|
-
if (request.mode === "websocket") {}
|
|
13559
|
+
if (request.mode === "websocket") {}
|
|
13342
13560
|
let requestBody = null;
|
|
13343
13561
|
if (request.body == null && fetchParams.processRequestEndOfBody) {
|
|
13344
13562
|
queueMicrotask(() => fetchParams.processRequestEndOfBody());
|
|
@@ -13507,23 +13725,25 @@ var require_fetch = __commonJS((exports, module) => {
|
|
|
13507
13725
|
if (status < 200) {
|
|
13508
13726
|
return;
|
|
13509
13727
|
}
|
|
13510
|
-
let codings = [];
|
|
13511
13728
|
let location = "";
|
|
13512
13729
|
const headersList = new HeadersList;
|
|
13513
13730
|
for (let i = 0;i < rawHeaders.length; i += 2) {
|
|
13514
13731
|
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true);
|
|
13515
13732
|
}
|
|
13516
|
-
const contentEncoding = headersList.get("content-encoding", true);
|
|
13517
|
-
if (contentEncoding) {
|
|
13518
|
-
codings = contentEncoding.toLowerCase().split(",").map((x) => x.trim());
|
|
13519
|
-
}
|
|
13520
13733
|
location = headersList.get("location", true);
|
|
13521
13734
|
this.body = new Readable({ read: resume });
|
|
13522
13735
|
const decoders = [];
|
|
13523
13736
|
const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status);
|
|
13524
|
-
if (
|
|
13737
|
+
if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
|
13738
|
+
const contentEncoding = headersList.get("content-encoding", true);
|
|
13739
|
+
const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : [];
|
|
13740
|
+
const maxContentEncodings = 5;
|
|
13741
|
+
if (codings.length > maxContentEncodings) {
|
|
13742
|
+
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
|
13743
|
+
return true;
|
|
13744
|
+
}
|
|
13525
13745
|
for (let i = codings.length - 1;i >= 0; --i) {
|
|
13526
|
-
const coding = codings[i];
|
|
13746
|
+
const coding = codings[i].trim();
|
|
13527
13747
|
if (coding === "x-gzip" || coding === "gzip") {
|
|
13528
13748
|
decoders.push(zlib.createGunzip({
|
|
13529
13749
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
@@ -15845,13 +16065,17 @@ var require_util7 = __commonJS((exports, module) => {
|
|
|
15845
16065
|
return extensionList;
|
|
15846
16066
|
}
|
|
15847
16067
|
function isValidClientWindowBits(value) {
|
|
16068
|
+
if (value.length === 0) {
|
|
16069
|
+
return false;
|
|
16070
|
+
}
|
|
15848
16071
|
for (let i = 0;i < value.length; i++) {
|
|
15849
16072
|
const byte = value.charCodeAt(i);
|
|
15850
16073
|
if (byte < 48 || byte > 57) {
|
|
15851
16074
|
return false;
|
|
15852
16075
|
}
|
|
15853
16076
|
}
|
|
15854
|
-
|
|
16077
|
+
const num = Number.parseInt(value, 10);
|
|
16078
|
+
return num >= 8 && num <= 15;
|
|
15855
16079
|
}
|
|
15856
16080
|
var hasIntl = typeof process.versions.icu === "string";
|
|
15857
16081
|
var fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : undefined;
|
|
@@ -16137,18 +16361,26 @@ var require_connection = __commonJS((exports, module) => {
|
|
|
16137
16361
|
var require_permessage_deflate = __commonJS((exports, module) => {
|
|
16138
16362
|
var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib");
|
|
16139
16363
|
var { isValidClientWindowBits } = require_util7();
|
|
16364
|
+
var { MessageSizeExceededError } = require_errors();
|
|
16140
16365
|
var tail = Buffer.from([0, 0, 255, 255]);
|
|
16141
16366
|
var kBuffer = Symbol("kBuffer");
|
|
16142
16367
|
var kLength = Symbol("kLength");
|
|
16368
|
+
var kDefaultMaxDecompressedSize = 4 * 1024 * 1024;
|
|
16143
16369
|
|
|
16144
16370
|
class PerMessageDeflate {
|
|
16145
16371
|
#inflate;
|
|
16146
16372
|
#options = {};
|
|
16373
|
+
#aborted = false;
|
|
16374
|
+
#currentCallback = null;
|
|
16147
16375
|
constructor(extensions) {
|
|
16148
16376
|
this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover");
|
|
16149
16377
|
this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits");
|
|
16150
16378
|
}
|
|
16151
16379
|
decompress(chunk, fin, callback) {
|
|
16380
|
+
if (this.#aborted) {
|
|
16381
|
+
callback(new MessageSizeExceededError);
|
|
16382
|
+
return;
|
|
16383
|
+
}
|
|
16152
16384
|
if (!this.#inflate) {
|
|
16153
16385
|
let windowBits = Z_DEFAULT_WINDOWBITS;
|
|
16154
16386
|
if (this.#options.serverMaxWindowBits) {
|
|
@@ -16158,26 +16390,51 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
16158
16390
|
}
|
|
16159
16391
|
windowBits = Number.parseInt(this.#options.serverMaxWindowBits);
|
|
16160
16392
|
}
|
|
16161
|
-
|
|
16393
|
+
try {
|
|
16394
|
+
this.#inflate = createInflateRaw({ windowBits });
|
|
16395
|
+
} catch (err) {
|
|
16396
|
+
callback(err);
|
|
16397
|
+
return;
|
|
16398
|
+
}
|
|
16162
16399
|
this.#inflate[kBuffer] = [];
|
|
16163
16400
|
this.#inflate[kLength] = 0;
|
|
16164
16401
|
this.#inflate.on("data", (data) => {
|
|
16165
|
-
this.#
|
|
16402
|
+
if (this.#aborted) {
|
|
16403
|
+
return;
|
|
16404
|
+
}
|
|
16166
16405
|
this.#inflate[kLength] += data.length;
|
|
16406
|
+
if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {
|
|
16407
|
+
this.#aborted = true;
|
|
16408
|
+
this.#inflate.removeAllListeners();
|
|
16409
|
+
this.#inflate.destroy();
|
|
16410
|
+
this.#inflate = null;
|
|
16411
|
+
if (this.#currentCallback) {
|
|
16412
|
+
const cb = this.#currentCallback;
|
|
16413
|
+
this.#currentCallback = null;
|
|
16414
|
+
cb(new MessageSizeExceededError);
|
|
16415
|
+
}
|
|
16416
|
+
return;
|
|
16417
|
+
}
|
|
16418
|
+
this.#inflate[kBuffer].push(data);
|
|
16167
16419
|
});
|
|
16168
16420
|
this.#inflate.on("error", (err) => {
|
|
16169
16421
|
this.#inflate = null;
|
|
16170
16422
|
callback(err);
|
|
16171
16423
|
});
|
|
16172
16424
|
}
|
|
16425
|
+
this.#currentCallback = callback;
|
|
16173
16426
|
this.#inflate.write(chunk);
|
|
16174
16427
|
if (fin) {
|
|
16175
16428
|
this.#inflate.write(tail);
|
|
16176
16429
|
}
|
|
16177
16430
|
this.#inflate.flush(() => {
|
|
16431
|
+
if (this.#aborted || !this.#inflate) {
|
|
16432
|
+
return;
|
|
16433
|
+
}
|
|
16178
16434
|
const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]);
|
|
16179
16435
|
this.#inflate[kBuffer].length = 0;
|
|
16180
16436
|
this.#inflate[kLength] = 0;
|
|
16437
|
+
this.#currentCallback = null;
|
|
16181
16438
|
callback(null, full);
|
|
16182
16439
|
});
|
|
16183
16440
|
}
|
|
@@ -16308,12 +16565,12 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
16308
16565
|
}
|
|
16309
16566
|
const buffer = this.consume(8);
|
|
16310
16567
|
const upper = buffer.readUInt32BE(0);
|
|
16311
|
-
|
|
16568
|
+
const lower = buffer.readUInt32BE(4);
|
|
16569
|
+
if (upper !== 0 || lower > 2 ** 31 - 1) {
|
|
16312
16570
|
failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes.");
|
|
16313
16571
|
return;
|
|
16314
16572
|
}
|
|
16315
|
-
|
|
16316
|
-
this.#info.payloadLength = (upper << 8) + lower;
|
|
16573
|
+
this.#info.payloadLength = lower;
|
|
16317
16574
|
this.#state = parserStates.READ_DATA;
|
|
16318
16575
|
} else if (this.#state === parserStates.READ_DATA) {
|
|
16319
16576
|
if (this.#byteOffset < this.#info.payloadLength) {
|
|
@@ -16335,7 +16592,7 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
16335
16592
|
} else {
|
|
16336
16593
|
this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => {
|
|
16337
16594
|
if (error) {
|
|
16338
|
-
|
|
16595
|
+
failWebsocketConnection(this.ws, error.message);
|
|
16339
16596
|
return;
|
|
16340
16597
|
}
|
|
16341
16598
|
this.#fragments.push(data);
|
|
@@ -17744,7 +18001,7 @@ var require_common = __commonJS((exports) => {
|
|
|
17744
18001
|
// node_modules/discord-api-types/payloads/v10/application.js
|
|
17745
18002
|
var require_application = __commonJS((exports) => {
|
|
17746
18003
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17747
|
-
exports.ApplicationWebhookEventStatus = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = undefined;
|
|
18004
|
+
exports.ApplicationWebhookEventStatus = exports.ActivityLocationKind = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = undefined;
|
|
17748
18005
|
var ApplicationFlags;
|
|
17749
18006
|
(function(ApplicationFlags2) {
|
|
17750
18007
|
ApplicationFlags2[ApplicationFlags2["EmbeddedReleased"] = 2] = "EmbeddedReleased";
|
|
@@ -17775,6 +18032,11 @@ var require_application = __commonJS((exports) => {
|
|
|
17775
18032
|
ApplicationRoleConnectionMetadataType2[ApplicationRoleConnectionMetadataType2["BooleanEqual"] = 7] = "BooleanEqual";
|
|
17776
18033
|
ApplicationRoleConnectionMetadataType2[ApplicationRoleConnectionMetadataType2["BooleanNotEqual"] = 8] = "BooleanNotEqual";
|
|
17777
18034
|
})(ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = ApplicationRoleConnectionMetadataType = {}));
|
|
18035
|
+
var ActivityLocationKind;
|
|
18036
|
+
(function(ActivityLocationKind2) {
|
|
18037
|
+
ActivityLocationKind2["GuildChannel"] = "gc";
|
|
18038
|
+
ActivityLocationKind2["PrivateChannel"] = "pc";
|
|
18039
|
+
})(ActivityLocationKind || (exports.ActivityLocationKind = ActivityLocationKind = {}));
|
|
17778
18040
|
var ApplicationWebhookEventStatus;
|
|
17779
18041
|
(function(ApplicationWebhookEventStatus2) {
|
|
17780
18042
|
ApplicationWebhookEventStatus2[ApplicationWebhookEventStatus2["Disabled"] = 1] = "Disabled";
|
|
@@ -18408,7 +18670,7 @@ var require_invite = __commonJS((exports) => {
|
|
|
18408
18670
|
// node_modules/discord-api-types/payloads/v10/message.js
|
|
18409
18671
|
var require_message = __commonJS((exports) => {
|
|
18410
18672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18411
|
-
exports.SeparatorSpacingSize = exports.UnfurledMediaItemLoadingState = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.MessageFlags = exports.MessageReferenceType = exports.MessageActivityType = exports.MessageType = undefined;
|
|
18673
|
+
exports.MessageSearchSortMode = exports.MessageSearchEmbedType = exports.MessageSearchHasType = exports.MessageSearchAuthorType = exports.SeparatorSpacingSize = exports.UnfurledMediaItemFlags = exports.UnfurledMediaItemLoadingState = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedMediaFlags = exports.EmbedFlags = exports.EmbedType = exports.BaseThemeType = exports.MessageFlags = exports.MessageReferenceType = exports.MessageActivityType = exports.MessageType = undefined;
|
|
18412
18674
|
var MessageType;
|
|
18413
18675
|
(function(MessageType2) {
|
|
18414
18676
|
MessageType2[MessageType2["Default"] = 0] = "Default";
|
|
@@ -18479,6 +18741,14 @@ var require_message = __commonJS((exports) => {
|
|
|
18479
18741
|
MessageFlags2[MessageFlags2["HasSnapshot"] = 16384] = "HasSnapshot";
|
|
18480
18742
|
MessageFlags2[MessageFlags2["IsComponentsV2"] = 32768] = "IsComponentsV2";
|
|
18481
18743
|
})(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
|
|
18744
|
+
var BaseThemeType;
|
|
18745
|
+
(function(BaseThemeType2) {
|
|
18746
|
+
BaseThemeType2[BaseThemeType2["Unset"] = 0] = "Unset";
|
|
18747
|
+
BaseThemeType2[BaseThemeType2["Dark"] = 1] = "Dark";
|
|
18748
|
+
BaseThemeType2[BaseThemeType2["Light"] = 2] = "Light";
|
|
18749
|
+
BaseThemeType2[BaseThemeType2["Darker"] = 3] = "Darker";
|
|
18750
|
+
BaseThemeType2[BaseThemeType2["Midnight"] = 4] = "Midnight";
|
|
18751
|
+
})(BaseThemeType || (exports.BaseThemeType = BaseThemeType = {}));
|
|
18482
18752
|
var EmbedType;
|
|
18483
18753
|
(function(EmbedType2) {
|
|
18484
18754
|
EmbedType2["Rich"] = "rich";
|
|
@@ -18490,9 +18760,21 @@ var require_message = __commonJS((exports) => {
|
|
|
18490
18760
|
EmbedType2["AutoModerationMessage"] = "auto_moderation_message";
|
|
18491
18761
|
EmbedType2["PollResult"] = "poll_result";
|
|
18492
18762
|
})(EmbedType || (exports.EmbedType = EmbedType = {}));
|
|
18763
|
+
var EmbedFlags;
|
|
18764
|
+
(function(EmbedFlags2) {
|
|
18765
|
+
EmbedFlags2[EmbedFlags2["IsContentInventoryEntry"] = 32] = "IsContentInventoryEntry";
|
|
18766
|
+
})(EmbedFlags || (exports.EmbedFlags = EmbedFlags = {}));
|
|
18767
|
+
var EmbedMediaFlags;
|
|
18768
|
+
(function(EmbedMediaFlags2) {
|
|
18769
|
+
EmbedMediaFlags2[EmbedMediaFlags2["IsAnimated"] = 32] = "IsAnimated";
|
|
18770
|
+
})(EmbedMediaFlags || (exports.EmbedMediaFlags = EmbedMediaFlags = {}));
|
|
18493
18771
|
var AttachmentFlags;
|
|
18494
18772
|
(function(AttachmentFlags2) {
|
|
18773
|
+
AttachmentFlags2[AttachmentFlags2["IsClip"] = 1] = "IsClip";
|
|
18774
|
+
AttachmentFlags2[AttachmentFlags2["IsThumbnail"] = 2] = "IsThumbnail";
|
|
18495
18775
|
AttachmentFlags2[AttachmentFlags2["IsRemix"] = 4] = "IsRemix";
|
|
18776
|
+
AttachmentFlags2[AttachmentFlags2["IsSpoiler"] = 8] = "IsSpoiler";
|
|
18777
|
+
AttachmentFlags2[AttachmentFlags2["IsAnimated"] = 32] = "IsAnimated";
|
|
18496
18778
|
})(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
|
|
18497
18779
|
var AllowedMentionsTypes;
|
|
18498
18780
|
(function(AllowedMentionsTypes2) {
|
|
@@ -18552,11 +18834,58 @@ var require_message = __commonJS((exports) => {
|
|
|
18552
18834
|
UnfurledMediaItemLoadingState2[UnfurledMediaItemLoadingState2["LoadedSuccess"] = 2] = "LoadedSuccess";
|
|
18553
18835
|
UnfurledMediaItemLoadingState2[UnfurledMediaItemLoadingState2["LoadedNotFound"] = 3] = "LoadedNotFound";
|
|
18554
18836
|
})(UnfurledMediaItemLoadingState || (exports.UnfurledMediaItemLoadingState = UnfurledMediaItemLoadingState = {}));
|
|
18837
|
+
var UnfurledMediaItemFlags;
|
|
18838
|
+
(function(UnfurledMediaItemFlags2) {
|
|
18839
|
+
UnfurledMediaItemFlags2[UnfurledMediaItemFlags2["IsAnimated"] = 1] = "IsAnimated";
|
|
18840
|
+
})(UnfurledMediaItemFlags || (exports.UnfurledMediaItemFlags = UnfurledMediaItemFlags = {}));
|
|
18555
18841
|
var SeparatorSpacingSize;
|
|
18556
18842
|
(function(SeparatorSpacingSize2) {
|
|
18557
18843
|
SeparatorSpacingSize2[SeparatorSpacingSize2["Small"] = 1] = "Small";
|
|
18558
18844
|
SeparatorSpacingSize2[SeparatorSpacingSize2["Large"] = 2] = "Large";
|
|
18559
18845
|
})(SeparatorSpacingSize || (exports.SeparatorSpacingSize = SeparatorSpacingSize = {}));
|
|
18846
|
+
var MessageSearchAuthorType;
|
|
18847
|
+
(function(MessageSearchAuthorType2) {
|
|
18848
|
+
MessageSearchAuthorType2["User"] = "user";
|
|
18849
|
+
MessageSearchAuthorType2["Bot"] = "bot";
|
|
18850
|
+
MessageSearchAuthorType2["Webhook"] = "webhook";
|
|
18851
|
+
MessageSearchAuthorType2["NotUser"] = "-user";
|
|
18852
|
+
MessageSearchAuthorType2["NotBot"] = "-bot";
|
|
18853
|
+
MessageSearchAuthorType2["NotWebhook"] = "-webhook";
|
|
18854
|
+
})(MessageSearchAuthorType || (exports.MessageSearchAuthorType = MessageSearchAuthorType = {}));
|
|
18855
|
+
var MessageSearchHasType;
|
|
18856
|
+
(function(MessageSearchHasType2) {
|
|
18857
|
+
MessageSearchHasType2["Image"] = "image";
|
|
18858
|
+
MessageSearchHasType2["Sound"] = "sound";
|
|
18859
|
+
MessageSearchHasType2["Video"] = "video";
|
|
18860
|
+
MessageSearchHasType2["File"] = "file";
|
|
18861
|
+
MessageSearchHasType2["Sticker"] = "sticker";
|
|
18862
|
+
MessageSearchHasType2["Embed"] = "embed";
|
|
18863
|
+
MessageSearchHasType2["Link"] = "link";
|
|
18864
|
+
MessageSearchHasType2["Poll"] = "poll";
|
|
18865
|
+
MessageSearchHasType2["Snapshot"] = "snapshot";
|
|
18866
|
+
MessageSearchHasType2["NotImage"] = "-image";
|
|
18867
|
+
MessageSearchHasType2["NotSound"] = "-sound";
|
|
18868
|
+
MessageSearchHasType2["NotVideo"] = "-video";
|
|
18869
|
+
MessageSearchHasType2["NotFile"] = "-file";
|
|
18870
|
+
MessageSearchHasType2["NotSticker"] = "-sticker";
|
|
18871
|
+
MessageSearchHasType2["NotEmbed"] = "-embed";
|
|
18872
|
+
MessageSearchHasType2["NotLink"] = "-link";
|
|
18873
|
+
MessageSearchHasType2["NotPoll"] = "-poll";
|
|
18874
|
+
MessageSearchHasType2["NotSnapshot"] = "-snapshot";
|
|
18875
|
+
})(MessageSearchHasType || (exports.MessageSearchHasType = MessageSearchHasType = {}));
|
|
18876
|
+
var MessageSearchEmbedType;
|
|
18877
|
+
(function(MessageSearchEmbedType2) {
|
|
18878
|
+
MessageSearchEmbedType2["Image"] = "image";
|
|
18879
|
+
MessageSearchEmbedType2["Video"] = "video";
|
|
18880
|
+
MessageSearchEmbedType2["Gif"] = "gif";
|
|
18881
|
+
MessageSearchEmbedType2["Sound"] = "sound";
|
|
18882
|
+
MessageSearchEmbedType2["Article"] = "article";
|
|
18883
|
+
})(MessageSearchEmbedType || (exports.MessageSearchEmbedType = MessageSearchEmbedType = {}));
|
|
18884
|
+
var MessageSearchSortMode;
|
|
18885
|
+
(function(MessageSearchSortMode2) {
|
|
18886
|
+
MessageSearchSortMode2["Timestamp"] = "timestamp";
|
|
18887
|
+
MessageSearchSortMode2["Relevance"] = "relevance";
|
|
18888
|
+
})(MessageSearchSortMode || (exports.MessageSearchSortMode = MessageSearchSortMode = {}));
|
|
18560
18889
|
});
|
|
18561
18890
|
|
|
18562
18891
|
// node_modules/discord-api-types/payloads/v10/monetization.js
|
|
@@ -18874,7 +19203,7 @@ var require_internals = __commonJS((exports) => {
|
|
|
18874
19203
|
// node_modules/discord-api-types/rest/common.js
|
|
18875
19204
|
var require_common2 = __commonJS((exports) => {
|
|
18876
19205
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18877
|
-
exports.Locale = exports.RESTJSONErrorCodes = undefined;
|
|
19206
|
+
exports.Locale = exports.CannotSendMessagesToThisUserErrorCodes = exports.RESTJSONErrorCodes = undefined;
|
|
18878
19207
|
var RESTJSONErrorCodes;
|
|
18879
19208
|
(function(RESTJSONErrorCodes2) {
|
|
18880
19209
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["GeneralError"] = 0] = "GeneralError";
|
|
@@ -18932,7 +19261,9 @@ var require_common2 = __commonJS((exports) => {
|
|
|
18932
19261
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction";
|
|
18933
19262
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded";
|
|
18934
19263
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["UnderMinimumAge"] = 20024] = "UnderMinimumAge";
|
|
19264
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ChannelWriteRateLimit"] = 20028] = "ChannelWriteRateLimit";
|
|
18935
19265
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ChannelSendRateLimit"] = 20028] = "ChannelSendRateLimit";
|
|
19266
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ServerWriteRateLimit"] = 20029] = "ServerWriteRateLimit";
|
|
18936
19267
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ServerSendRateLimit"] = 20029] = "ServerSendRateLimit";
|
|
18937
19268
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords"] = 20031] = "StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords";
|
|
18938
19269
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["GuildPremiumSubscriptionLevelTooLow"] = 20035] = "GuildPremiumSubscriptionLevelTooLow";
|
|
@@ -19050,6 +19381,7 @@ var require_common2 = __commonJS((exports) => {
|
|
|
19050
19381
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ProvidedFileDurationExceedsMaximumLength"] = 50124] = "ProvidedFileDurationExceedsMaximumLength";
|
|
19051
19382
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["OwnerCannotBePendingMember"] = 50131] = "OwnerCannotBePendingMember";
|
|
19052
19383
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["OwnershipCannotBeMovedToABotUser"] = 50132] = "OwnershipCannotBeMovedToABotUser";
|
|
19384
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["FailedToResizeAssetBelowTheMaximumSize"] = 50138] = "FailedToResizeAssetBelowTheMaximumSize";
|
|
19053
19385
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["FailedToResizeAssetBelowTheMinimumSize"] = 50138] = "FailedToResizeAssetBelowTheMinimumSize";
|
|
19054
19386
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"] = 50144] = "CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji";
|
|
19055
19387
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotConvertBetweenPremiumEmojiAndNormalEmoji"] = 50145] = "CannotConvertBetweenPremiumEmojiAndNormalEmoji";
|
|
@@ -19063,11 +19395,13 @@ var require_common2 = __commonJS((exports) => {
|
|
|
19063
19395
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
19064
19396
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
19065
19397
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ProvidedFileDoesNotHaveAValidDuration"] = 50192] = "ProvidedFileDoesNotHaveAValidDuration";
|
|
19398
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
19066
19399
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
19067
19400
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
19068
19401
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
19069
19402
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
19070
19403
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
19404
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
19071
19405
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
19072
19406
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
19073
19407
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -19076,6 +19410,7 @@ var require_common2 = __commonJS((exports) => {
|
|
|
19076
19410
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
19077
19411
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
19078
19412
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
19413
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotForwardMessageWithUnreadableContent"] = 160014] = "CannotForwardMessageWithUnreadableContent";
|
|
19079
19414
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
19080
19415
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
19081
19416
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -19102,7 +19437,18 @@ var require_common2 = __commonJS((exports) => {
|
|
|
19102
19437
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotEditAPollMessage"] = 520003] = "CannotEditAPollMessage";
|
|
19103
19438
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotUseAnEmojiIncludedWithThePoll"] = 520004] = "CannotUseAnEmojiIncludedWithThePoll";
|
|
19104
19439
|
RESTJSONErrorCodes2[RESTJSONErrorCodes2["CannotExpireANonPollMessage"] = 520006] = "CannotExpireANonPollMessage";
|
|
19440
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["ProvisionalAccountsPermissionNotGranted"] = 530000] = "ProvisionalAccountsPermissionNotGranted";
|
|
19441
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["IdTokenJWTExpired"] = 530001] = "IdTokenJWTExpired";
|
|
19442
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["IdTokenJWTIssuerMismatch"] = 530002] = "IdTokenJWTIssuerMismatch";
|
|
19443
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["IdTokenJWTAudienceMismatch"] = 530003] = "IdTokenJWTAudienceMismatch";
|
|
19444
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["IdTokenJWTIssuedTooLongAgo"] = 530004] = "IdTokenJWTIssuedTooLongAgo";
|
|
19445
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["FailedToGenerateUniqueUsername"] = 530006] = "FailedToGenerateUniqueUsername";
|
|
19446
|
+
RESTJSONErrorCodes2[RESTJSONErrorCodes2["InvalidClientSecret"] = 530007] = "InvalidClientSecret";
|
|
19105
19447
|
})(RESTJSONErrorCodes || (exports.RESTJSONErrorCodes = RESTJSONErrorCodes = {}));
|
|
19448
|
+
exports.CannotSendMessagesToThisUserErrorCodes = [
|
|
19449
|
+
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
|
|
19450
|
+
RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds
|
|
19451
|
+
];
|
|
19106
19452
|
var Locale;
|
|
19107
19453
|
(function(Locale2) {
|
|
19108
19454
|
Locale2["Indonesian"] = "id";
|
|
@@ -19147,6 +19493,7 @@ var require_channel2 = __commonJS((exports) => {
|
|
|
19147
19493
|
var ReactionType;
|
|
19148
19494
|
(function(ReactionType2) {
|
|
19149
19495
|
ReactionType2[ReactionType2["Normal"] = 0] = "Normal";
|
|
19496
|
+
ReactionType2[ReactionType2["Burst"] = 1] = "Burst";
|
|
19150
19497
|
ReactionType2[ReactionType2["Super"] = 1] = "Super";
|
|
19151
19498
|
})(ReactionType || (exports.ReactionType = ReactionType = {}));
|
|
19152
19499
|
});
|
|
@@ -19285,6 +19632,9 @@ var require_v103 = __commonJS((exports) => {
|
|
|
19285
19632
|
guildMembersSearch(guildId) {
|
|
19286
19633
|
return `/guilds/${guildId}/members/search`;
|
|
19287
19634
|
},
|
|
19635
|
+
guildMessagesSearch(guildId) {
|
|
19636
|
+
return `/guilds/${guildId}/messages/search`;
|
|
19637
|
+
},
|
|
19288
19638
|
guildCurrentMemberNickname(guildId) {
|
|
19289
19639
|
return `/guilds/${guildId}/members/@me/nick`;
|
|
19290
19640
|
},
|
|
@@ -19511,6 +19861,9 @@ var require_v103 = __commonJS((exports) => {
|
|
|
19511
19861
|
currentApplication() {
|
|
19512
19862
|
return "/applications/@me";
|
|
19513
19863
|
},
|
|
19864
|
+
applicationActivityInstance(applicationId, instanceId) {
|
|
19865
|
+
return `/applications/${applicationId}/activity-instances/${instanceId}`;
|
|
19866
|
+
},
|
|
19514
19867
|
entitlements(applicationId) {
|
|
19515
19868
|
return `/applications/${applicationId}/entitlements`;
|
|
19516
19869
|
},
|
|
@@ -19969,11 +20322,40 @@ var require_v106 = __commonJS((exports) => {
|
|
|
19969
20322
|
k2 = k;
|
|
19970
20323
|
o[k2] = m[k];
|
|
19971
20324
|
});
|
|
20325
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
20326
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20327
|
+
} : function(o, v) {
|
|
20328
|
+
o["default"] = v;
|
|
20329
|
+
});
|
|
19972
20330
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
19973
20331
|
for (var p in m)
|
|
19974
20332
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
|
|
19975
20333
|
__createBinding(exports2, m, p);
|
|
19976
20334
|
};
|
|
20335
|
+
var __importStar = exports && exports.__importStar || function() {
|
|
20336
|
+
var ownKeys = function(o) {
|
|
20337
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
20338
|
+
var ar = [];
|
|
20339
|
+
for (var k in o2)
|
|
20340
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
20341
|
+
ar[ar.length] = k;
|
|
20342
|
+
return ar;
|
|
20343
|
+
};
|
|
20344
|
+
return ownKeys(o);
|
|
20345
|
+
};
|
|
20346
|
+
return function(mod) {
|
|
20347
|
+
if (mod && mod.__esModule)
|
|
20348
|
+
return mod;
|
|
20349
|
+
var result = {};
|
|
20350
|
+
if (mod != null) {
|
|
20351
|
+
for (var k = ownKeys(mod), i = 0;i < k.length; i++)
|
|
20352
|
+
if (k[i] !== "default")
|
|
20353
|
+
__createBinding(result, mod, k[i]);
|
|
20354
|
+
}
|
|
20355
|
+
__setModuleDefault(result, mod);
|
|
20356
|
+
return result;
|
|
20357
|
+
};
|
|
20358
|
+
}();
|
|
19977
20359
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19978
20360
|
exports.Utils = undefined;
|
|
19979
20361
|
__exportStar(require_v10(), exports);
|
|
@@ -19982,7 +20364,7 @@ var require_v106 = __commonJS((exports) => {
|
|
|
19982
20364
|
__exportStar(require_v103(), exports);
|
|
19983
20365
|
__exportStar(require_v104(), exports);
|
|
19984
20366
|
__exportStar(require_internals(), exports);
|
|
19985
|
-
exports.Utils = require_v105();
|
|
20367
|
+
exports.Utils = __importStar(require_v105());
|
|
19986
20368
|
});
|
|
19987
20369
|
|
|
19988
20370
|
// node_modules/@discordjs/rest/node_modules/@discordjs/collection/dist/index.js
|
|
@@ -20416,38 +20798,44 @@ var require_dist2 = __commonJS((exports, module) => {
|
|
|
20416
20798
|
var version = "2.1.1";
|
|
20417
20799
|
});
|
|
20418
20800
|
|
|
20419
|
-
// node_modules/@sapphire/snowflake/dist/cjs/index.cjs
|
|
20801
|
+
// node_modules/@discordjs/rest/node_modules/@sapphire/snowflake/dist/cjs/index.cjs
|
|
20420
20802
|
var require_cjs = __commonJS((exports) => {
|
|
20421
20803
|
var __defProp2 = Object.defineProperty;
|
|
20422
20804
|
var __defNormalProp = (obj, key, value) => (key in obj) ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20423
20805
|
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
20424
|
-
var __publicField = (obj, key, value) =>
|
|
20425
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20426
|
-
return value;
|
|
20427
|
-
};
|
|
20806
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20428
20807
|
var IncrementSymbol = Symbol("@sapphire/snowflake.increment");
|
|
20429
20808
|
var EpochSymbol = Symbol("@sapphire/snowflake.epoch");
|
|
20809
|
+
var EpochNumberSymbol = Symbol("@sapphire/snowflake.epoch.number");
|
|
20430
20810
|
var ProcessIdSymbol = Symbol("@sapphire/snowflake.processId");
|
|
20431
20811
|
var WorkerIdSymbol = Symbol("@sapphire/snowflake.workerId");
|
|
20432
20812
|
var MaximumWorkerId = 0b11111n;
|
|
20433
20813
|
var MaximumProcessId = 0b11111n;
|
|
20434
20814
|
var MaximumIncrement = 0b111111111111n;
|
|
20815
|
+
var TimestampFieldDivisor = 2 ** 22;
|
|
20435
20816
|
var _a;
|
|
20436
20817
|
var _b;
|
|
20437
20818
|
var _c;
|
|
20438
20819
|
var _d;
|
|
20820
|
+
var _e;
|
|
20821
|
+
_e = EpochSymbol, _d = EpochNumberSymbol, _c = IncrementSymbol, _b = ProcessIdSymbol, _a = WorkerIdSymbol;
|
|
20439
20822
|
var _Snowflake = class _Snowflake2 {
|
|
20440
20823
|
constructor(epoch) {
|
|
20441
20824
|
__publicField(this, "decode", this.deconstruct);
|
|
20442
|
-
__publicField(this,
|
|
20443
|
-
__publicField(this,
|
|
20444
|
-
__publicField(this, _c,
|
|
20445
|
-
__publicField(this,
|
|
20825
|
+
__publicField(this, _e);
|
|
20826
|
+
__publicField(this, _d);
|
|
20827
|
+
__publicField(this, _c, 0n);
|
|
20828
|
+
__publicField(this, _b, 1n);
|
|
20829
|
+
__publicField(this, _a, 0n);
|
|
20446
20830
|
this[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);
|
|
20831
|
+
this[EpochNumberSymbol] = Number(this[EpochSymbol]);
|
|
20447
20832
|
}
|
|
20448
20833
|
get epoch() {
|
|
20449
20834
|
return this[EpochSymbol];
|
|
20450
20835
|
}
|
|
20836
|
+
get epochNumber() {
|
|
20837
|
+
return this[EpochNumberSymbol];
|
|
20838
|
+
}
|
|
20451
20839
|
get processId() {
|
|
20452
20840
|
return this[ProcessIdSymbol];
|
|
20453
20841
|
}
|
|
@@ -20492,14 +20880,13 @@ var require_cjs = __commonJS((exports) => {
|
|
|
20492
20880
|
};
|
|
20493
20881
|
}
|
|
20494
20882
|
timestampFrom(id) {
|
|
20495
|
-
return Number(
|
|
20883
|
+
return Math.floor(Number(id) / TimestampFieldDivisor) + this[EpochNumberSymbol];
|
|
20496
20884
|
}
|
|
20497
20885
|
static compare(a, b) {
|
|
20498
20886
|
const typeA = typeof a;
|
|
20499
20887
|
return typeA === typeof b ? typeA === "string" ? cmpString(a, b) : cmpBigInt(a, b) : cmpBigInt(BigInt(a), BigInt(b));
|
|
20500
20888
|
}
|
|
20501
20889
|
};
|
|
20502
|
-
_a = EpochSymbol, _b = IncrementSymbol, _c = ProcessIdSymbol, _d = WorkerIdSymbol;
|
|
20503
20890
|
__name(_Snowflake, "Snowflake");
|
|
20504
20891
|
var Snowflake = _Snowflake;
|
|
20505
20892
|
function cmpBigInt(a, b) {
|
|
@@ -24920,8 +25307,8 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
24920
25307
|
return to;
|
|
24921
25308
|
};
|
|
24922
25309
|
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
|
|
24923
|
-
var
|
|
24924
|
-
__export2(
|
|
25310
|
+
var index_exports = {};
|
|
25311
|
+
__export2(index_exports, {
|
|
24925
25312
|
ALLOWED_EXTENSIONS: () => ALLOWED_EXTENSIONS,
|
|
24926
25313
|
ALLOWED_SIZES: () => ALLOWED_SIZES,
|
|
24927
25314
|
ALLOWED_STICKER_EXTENSIONS: () => ALLOWED_STICKER_EXTENSIONS,
|
|
@@ -24943,7 +25330,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
24943
25330
|
parseResponse: () => parseResponse,
|
|
24944
25331
|
version: () => version
|
|
24945
25332
|
});
|
|
24946
|
-
module.exports = __toCommonJS(
|
|
25333
|
+
module.exports = __toCommonJS(index_exports);
|
|
24947
25334
|
var import_node_buffer = __require("buffer");
|
|
24948
25335
|
var import_util2 = require_dist();
|
|
24949
25336
|
var import_undici2 = require_undici();
|
|
@@ -25020,7 +25407,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
25020
25407
|
var import_v102 = require_v106();
|
|
25021
25408
|
var import_util = require_dist();
|
|
25022
25409
|
var import_v10 = require_v106();
|
|
25023
|
-
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.6.
|
|
25410
|
+
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.6.1)`;
|
|
25024
25411
|
var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
|
|
25025
25412
|
var DefaultRestOptions = {
|
|
25026
25413
|
agent: null,
|
|
@@ -26001,7 +26388,7 @@ ${flattened}` : error.message || flattened || "Unknown Error";
|
|
|
26001
26388
|
};
|
|
26002
26389
|
}
|
|
26003
26390
|
};
|
|
26004
|
-
var version = "2.6.
|
|
26391
|
+
var version = "2.6.1";
|
|
26005
26392
|
globalThis.FormData ??= import_undici2.FormData;
|
|
26006
26393
|
globalThis.Blob ??= import_node_buffer.Blob;
|
|
26007
26394
|
setDefaultStrategy((0, import_util2.shouldUseGlobalFetchAndWebSocket)() ? fetch : makeRequest);
|
|
@@ -26259,14 +26646,17 @@ var require_DJSError = __commonJS((exports, module) => {
|
|
|
26259
26646
|
var ErrorCodes = require_ErrorCodes();
|
|
26260
26647
|
var Messages = require_Messages();
|
|
26261
26648
|
function makeDiscordjsError(Base) {
|
|
26262
|
-
return class
|
|
26649
|
+
return class extends Base {
|
|
26650
|
+
static {
|
|
26651
|
+
Object.defineProperty(this, "name", { value: `Discordjs${Base.name}` });
|
|
26652
|
+
}
|
|
26263
26653
|
constructor(code, ...args) {
|
|
26264
26654
|
super(message(code, args));
|
|
26265
26655
|
this.code = code;
|
|
26266
|
-
Error.captureStackTrace
|
|
26656
|
+
Error.captureStackTrace(this, this.constructor);
|
|
26267
26657
|
}
|
|
26268
26658
|
get name() {
|
|
26269
|
-
return `${
|
|
26659
|
+
return `${this.constructor.name} [${this.code}]`;
|
|
26270
26660
|
}
|
|
26271
26661
|
};
|
|
26272
26662
|
}
|
|
@@ -27199,6 +27589,110 @@ var require_Attachment = __commonJS((exports, module) => {
|
|
|
27199
27589
|
module.exports = Attachment;
|
|
27200
27590
|
});
|
|
27201
27591
|
|
|
27592
|
+
// node_modules/@sapphire/snowflake/dist/cjs/index.cjs
|
|
27593
|
+
var require_cjs3 = __commonJS((exports) => {
|
|
27594
|
+
var __defProp2 = Object.defineProperty;
|
|
27595
|
+
var __defNormalProp = (obj, key, value) => (key in obj) ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
27596
|
+
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
27597
|
+
var __publicField = (obj, key, value) => {
|
|
27598
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
27599
|
+
return value;
|
|
27600
|
+
};
|
|
27601
|
+
var IncrementSymbol = Symbol("@sapphire/snowflake.increment");
|
|
27602
|
+
var EpochSymbol = Symbol("@sapphire/snowflake.epoch");
|
|
27603
|
+
var ProcessIdSymbol = Symbol("@sapphire/snowflake.processId");
|
|
27604
|
+
var WorkerIdSymbol = Symbol("@sapphire/snowflake.workerId");
|
|
27605
|
+
var MaximumWorkerId = 0b11111n;
|
|
27606
|
+
var MaximumProcessId = 0b11111n;
|
|
27607
|
+
var MaximumIncrement = 0b111111111111n;
|
|
27608
|
+
var _a;
|
|
27609
|
+
var _b;
|
|
27610
|
+
var _c;
|
|
27611
|
+
var _d;
|
|
27612
|
+
var _Snowflake = class _Snowflake2 {
|
|
27613
|
+
constructor(epoch) {
|
|
27614
|
+
__publicField(this, "decode", this.deconstruct);
|
|
27615
|
+
__publicField(this, _a);
|
|
27616
|
+
__publicField(this, _b, 0n);
|
|
27617
|
+
__publicField(this, _c, 1n);
|
|
27618
|
+
__publicField(this, _d, 0n);
|
|
27619
|
+
this[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);
|
|
27620
|
+
}
|
|
27621
|
+
get epoch() {
|
|
27622
|
+
return this[EpochSymbol];
|
|
27623
|
+
}
|
|
27624
|
+
get processId() {
|
|
27625
|
+
return this[ProcessIdSymbol];
|
|
27626
|
+
}
|
|
27627
|
+
set processId(value) {
|
|
27628
|
+
this[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;
|
|
27629
|
+
}
|
|
27630
|
+
get workerId() {
|
|
27631
|
+
return this[WorkerIdSymbol];
|
|
27632
|
+
}
|
|
27633
|
+
set workerId(value) {
|
|
27634
|
+
this[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;
|
|
27635
|
+
}
|
|
27636
|
+
generate({
|
|
27637
|
+
increment,
|
|
27638
|
+
timestamp = Date.now(),
|
|
27639
|
+
workerId = this[WorkerIdSymbol],
|
|
27640
|
+
processId = this[ProcessIdSymbol]
|
|
27641
|
+
} = {}) {
|
|
27642
|
+
if (timestamp instanceof Date)
|
|
27643
|
+
timestamp = BigInt(timestamp.getTime());
|
|
27644
|
+
else if (typeof timestamp === "number")
|
|
27645
|
+
timestamp = BigInt(timestamp);
|
|
27646
|
+
else if (typeof timestamp !== "bigint") {
|
|
27647
|
+
throw new TypeError(`"timestamp" argument must be a number, bigint, or Date (received ${typeof timestamp})`);
|
|
27648
|
+
}
|
|
27649
|
+
if (typeof increment !== "bigint") {
|
|
27650
|
+
increment = this[IncrementSymbol];
|
|
27651
|
+
this[IncrementSymbol] = increment + 1n & MaximumIncrement;
|
|
27652
|
+
}
|
|
27653
|
+
return timestamp - this[EpochSymbol] << 22n | (workerId & MaximumWorkerId) << 17n | (processId & MaximumProcessId) << 12n | increment & MaximumIncrement;
|
|
27654
|
+
}
|
|
27655
|
+
deconstruct(id) {
|
|
27656
|
+
const bigIntId = BigInt(id);
|
|
27657
|
+
const epoch = this[EpochSymbol];
|
|
27658
|
+
return {
|
|
27659
|
+
id: bigIntId,
|
|
27660
|
+
timestamp: (bigIntId >> 22n) + epoch,
|
|
27661
|
+
workerId: bigIntId >> 17n & MaximumWorkerId,
|
|
27662
|
+
processId: bigIntId >> 12n & MaximumProcessId,
|
|
27663
|
+
increment: bigIntId & MaximumIncrement,
|
|
27664
|
+
epoch
|
|
27665
|
+
};
|
|
27666
|
+
}
|
|
27667
|
+
timestampFrom(id) {
|
|
27668
|
+
return Number((BigInt(id) >> 22n) + this[EpochSymbol]);
|
|
27669
|
+
}
|
|
27670
|
+
static compare(a, b) {
|
|
27671
|
+
const typeA = typeof a;
|
|
27672
|
+
return typeA === typeof b ? typeA === "string" ? cmpString(a, b) : cmpBigInt(a, b) : cmpBigInt(BigInt(a), BigInt(b));
|
|
27673
|
+
}
|
|
27674
|
+
};
|
|
27675
|
+
_a = EpochSymbol, _b = IncrementSymbol, _c = ProcessIdSymbol, _d = WorkerIdSymbol;
|
|
27676
|
+
__name(_Snowflake, "Snowflake");
|
|
27677
|
+
var Snowflake = _Snowflake;
|
|
27678
|
+
function cmpBigInt(a, b) {
|
|
27679
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
27680
|
+
}
|
|
27681
|
+
__name(cmpBigInt, "cmpBigInt");
|
|
27682
|
+
function cmpString(a, b) {
|
|
27683
|
+
return a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;
|
|
27684
|
+
}
|
|
27685
|
+
__name(cmpString, "cmpString");
|
|
27686
|
+
var DiscordSnowflake = new Snowflake(1420070400000n);
|
|
27687
|
+
var TwitterSnowflake = new Snowflake(1288834974657n);
|
|
27688
|
+
exports.DiscordSnowflake = DiscordSnowflake;
|
|
27689
|
+
exports.MaximumIncrement = MaximumIncrement;
|
|
27690
|
+
exports.MaximumProcessId = MaximumProcessId;
|
|
27691
|
+
exports.MaximumWorkerId = MaximumWorkerId;
|
|
27692
|
+
exports.Snowflake = Snowflake;
|
|
27693
|
+
exports.TwitterSnowflake = TwitterSnowflake;
|
|
27694
|
+
});
|
|
27695
|
+
|
|
27202
27696
|
// node_modules/@discordjs/formatters/dist/index.js
|
|
27203
27697
|
var require_dist7 = __commonJS((exports, module) => {
|
|
27204
27698
|
var __defProp2 = Object.defineProperty;
|
|
@@ -27746,7 +28240,7 @@ var require_Constants = __commonJS((exports) => {
|
|
|
27746
28240
|
// node_modules/discord.js/src/structures/BaseChannel.js
|
|
27747
28241
|
var require_BaseChannel = __commonJS((exports) => {
|
|
27748
28242
|
var { channelLink, channelMention } = require_dist7();
|
|
27749
|
-
var { DiscordSnowflake } =
|
|
28243
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
27750
28244
|
var { ChannelType, Routes } = require_v106();
|
|
27751
28245
|
var Base = require_Base();
|
|
27752
28246
|
var ChannelFlagsBitField = require_ChannelFlagsBitField();
|
|
@@ -27944,7 +28438,7 @@ var require_RoleFlagsBitField = __commonJS((exports, module) => {
|
|
|
27944
28438
|
// node_modules/discord.js/src/structures/Role.js
|
|
27945
28439
|
var require_Role = __commonJS((exports) => {
|
|
27946
28440
|
var { roleMention } = require_dist7();
|
|
27947
|
-
var { DiscordSnowflake } =
|
|
28441
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
27948
28442
|
var { PermissionFlagsBits } = require_v106();
|
|
27949
28443
|
var Base = require_Base();
|
|
27950
28444
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -28263,7 +28757,7 @@ var require_PermissionOverwriteManager = __commonJS((exports, module) => {
|
|
|
28263
28757
|
|
|
28264
28758
|
// node_modules/discord.js/src/structures/GuildChannel.js
|
|
28265
28759
|
var require_GuildChannel = __commonJS((exports, module) => {
|
|
28266
|
-
var { Snowflake } =
|
|
28760
|
+
var { Snowflake } = require_cjs3();
|
|
28267
28761
|
var { PermissionFlagsBits, ChannelType } = require_v106();
|
|
28268
28762
|
var { BaseChannel } = require_BaseChannel();
|
|
28269
28763
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -28898,7 +29392,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
28898
29392
|
module.exports = {
|
|
28899
29393
|
$schema: "https://json.schemastore.org/package.json",
|
|
28900
29394
|
name: "discord.js",
|
|
28901
|
-
version: "14.
|
|
29395
|
+
version: "14.26.4",
|
|
28902
29396
|
description: "A powerful library for interacting with the Discord API",
|
|
28903
29397
|
main: "./src/index.js",
|
|
28904
29398
|
types: "./typings/index.d.ts",
|
|
@@ -28953,35 +29447,35 @@ var require_package = __commonJS((exports, module) => {
|
|
|
28953
29447
|
"@discordjs/collection": "1.5.3",
|
|
28954
29448
|
"@discordjs/ws": "^1.2.3",
|
|
28955
29449
|
"@sapphire/snowflake": "3.5.3",
|
|
28956
|
-
"discord-api-types": "^0.38.
|
|
29450
|
+
"discord-api-types": "^0.38.40",
|
|
28957
29451
|
"fast-deep-equal": "3.1.3",
|
|
28958
29452
|
"lodash.snakecase": "4.1.1",
|
|
28959
|
-
"magic-bytes.js": "^1.
|
|
29453
|
+
"magic-bytes.js": "^1.13.0",
|
|
28960
29454
|
tslib: "^2.6.3",
|
|
28961
|
-
undici: "6.
|
|
28962
|
-
"@discordjs/builders": "^1.13.0",
|
|
29455
|
+
undici: "6.24.1",
|
|
28963
29456
|
"@discordjs/formatters": "^0.6.2",
|
|
28964
|
-
"@discordjs/
|
|
28965
|
-
"@discordjs/
|
|
29457
|
+
"@discordjs/rest": "^2.6.1",
|
|
29458
|
+
"@discordjs/builders": "^1.14.1",
|
|
29459
|
+
"@discordjs/util": "^1.2.0"
|
|
28966
29460
|
},
|
|
28967
29461
|
devDependencies: {
|
|
28968
29462
|
"@favware/cliff-jumper": "^4.1.0",
|
|
28969
|
-
"@types/node": "^16.18.
|
|
28970
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
28971
|
-
"@typescript-eslint/parser": "^8.
|
|
29463
|
+
"@types/node": "^16.18.126",
|
|
29464
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
29465
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
28972
29466
|
"cross-env": "^7.0.3",
|
|
28973
29467
|
dtslint: "4.2.1",
|
|
28974
|
-
eslint: "^8.57.
|
|
29468
|
+
eslint: "^8.57.1",
|
|
28975
29469
|
"eslint-formatter-pretty": "^5.0.0",
|
|
28976
29470
|
jest: "29.7.0",
|
|
28977
|
-
prettier: "^3.
|
|
29471
|
+
prettier: "^3.8.1",
|
|
28978
29472
|
tsd: "^0.31.1",
|
|
28979
29473
|
tslint: "6.1.3",
|
|
28980
|
-
turbo: "^2.
|
|
28981
|
-
typescript: "~5.
|
|
28982
|
-
"@discordjs/api-extractor": "^7.38.1",
|
|
29474
|
+
turbo: "^2.8.10",
|
|
29475
|
+
typescript: "~5.8.3",
|
|
28983
29476
|
"@discordjs/docgen": "^0.12.1",
|
|
28984
|
-
"@discordjs/scripts": "^0.1.0"
|
|
29477
|
+
"@discordjs/scripts": "^0.1.0",
|
|
29478
|
+
"@discordjs/api-extractor": "^7.38.1"
|
|
28985
29479
|
},
|
|
28986
29480
|
engines: {
|
|
28987
29481
|
node: ">=18"
|
|
@@ -29190,7 +29684,7 @@ var require_BaseClient = __commonJS((exports, module) => {
|
|
|
29190
29684
|
var require_Emoji = __commonJS((exports) => {
|
|
29191
29685
|
var process2 = __require("node:process");
|
|
29192
29686
|
var { formatEmoji } = require_dist7();
|
|
29193
|
-
var { DiscordSnowflake } =
|
|
29687
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
29194
29688
|
var Base = require_Base();
|
|
29195
29689
|
var deprecationEmittedForURL = false;
|
|
29196
29690
|
|
|
@@ -29680,7 +30174,7 @@ var require_MessageCollector = __commonJS((exports, module) => {
|
|
|
29680
30174
|
|
|
29681
30175
|
// node_modules/discord.js/src/structures/GuildScheduledEvent.js
|
|
29682
30176
|
var require_GuildScheduledEvent = __commonJS((exports) => {
|
|
29683
|
-
var { DiscordSnowflake } =
|
|
30177
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
29684
30178
|
var { GuildScheduledEventStatus, GuildScheduledEventEntityType, RouteBases } = require_v106();
|
|
29685
30179
|
var Base = require_Base();
|
|
29686
30180
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -29883,7 +30377,7 @@ var require_GuildScheduledEvent = __commonJS((exports) => {
|
|
|
29883
30377
|
|
|
29884
30378
|
// node_modules/discord.js/src/structures/interfaces/Application.js
|
|
29885
30379
|
var require_Application = __commonJS((exports, module) => {
|
|
29886
|
-
var { DiscordSnowflake } =
|
|
30380
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
29887
30381
|
var Base = require_Base();
|
|
29888
30382
|
|
|
29889
30383
|
class Application extends Base {
|
|
@@ -30056,7 +30550,7 @@ var require_InviteFlagsBitField = __commonJS((exports) => {
|
|
|
30056
30550
|
// node_modules/discord.js/src/structures/BaseGuild.js
|
|
30057
30551
|
var require_BaseGuild = __commonJS((exports, module) => {
|
|
30058
30552
|
var { makeURLSearchParams } = require_dist5();
|
|
30059
|
-
var { DiscordSnowflake } =
|
|
30553
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
30060
30554
|
var { Routes, GuildFeature } = require_v106();
|
|
30061
30555
|
var Base = require_Base();
|
|
30062
30556
|
|
|
@@ -30553,7 +31047,7 @@ var require_MessageFlagsBitField = __commonJS((exports, module) => {
|
|
|
30553
31047
|
var require_BaseInteraction = __commonJS((exports, module) => {
|
|
30554
31048
|
var { deprecate } = __require("node:util");
|
|
30555
31049
|
var { Collection } = require_dist6();
|
|
30556
|
-
var { DiscordSnowflake } =
|
|
31050
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
30557
31051
|
var { InteractionType, ApplicationCommandType, ComponentType } = require_v106();
|
|
30558
31052
|
var Base = require_Base();
|
|
30559
31053
|
var { SelectMenuTypes } = require_Constants();
|
|
@@ -30688,6 +31182,8 @@ var require_TeamMember = __commonJS((exports, module) => {
|
|
|
30688
31182
|
_patch(data) {
|
|
30689
31183
|
if ("permissions" in data) {
|
|
30690
31184
|
this.permissions = data.permissions;
|
|
31185
|
+
} else {
|
|
31186
|
+
this.permissions ??= [];
|
|
30691
31187
|
}
|
|
30692
31188
|
if ("membership_state" in data) {
|
|
30693
31189
|
this.membershipState = data.membership_state;
|
|
@@ -30712,7 +31208,7 @@ var require_TeamMember = __commonJS((exports, module) => {
|
|
|
30712
31208
|
// node_modules/discord.js/src/structures/Team.js
|
|
30713
31209
|
var require_Team = __commonJS((exports, module) => {
|
|
30714
31210
|
var { Collection } = require_dist6();
|
|
30715
|
-
var { DiscordSnowflake } =
|
|
31211
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
30716
31212
|
var Base = require_Base();
|
|
30717
31213
|
var TeamMember = require_TeamMember();
|
|
30718
31214
|
|
|
@@ -31004,7 +31500,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
|
31004
31500
|
|
|
31005
31501
|
// node_modules/discord.js/src/structures/ApplicationCommand.js
|
|
31006
31502
|
var require_ApplicationCommand = __commonJS((exports, module) => {
|
|
31007
|
-
var { DiscordSnowflake } =
|
|
31503
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
31008
31504
|
var { ApplicationCommandOptionType } = require_v106();
|
|
31009
31505
|
var isEqual = require_fast_deep_equal();
|
|
31010
31506
|
var Base = require_Base();
|
|
@@ -32882,7 +33378,7 @@ var require_uniqWith = __commonJS((exports, module) => {
|
|
|
32882
33378
|
});
|
|
32883
33379
|
|
|
32884
33380
|
// node_modules/@sapphire/shapeshift/dist/cjs/index.cjs
|
|
32885
|
-
var
|
|
33381
|
+
var require_cjs4 = __commonJS((exports) => {
|
|
32886
33382
|
var get = require_get();
|
|
32887
33383
|
var fastDeepEqual = require_es6();
|
|
32888
33384
|
var uniqWith = require_uniqWith();
|
|
@@ -36162,7 +36658,7 @@ var require_mixins = __commonJS((exports) => {
|
|
|
36162
36658
|
});
|
|
36163
36659
|
|
|
36164
36660
|
// node_modules/ts-mixer/dist/cjs/index.js
|
|
36165
|
-
var
|
|
36661
|
+
var require_cjs5 = __commonJS((exports) => {
|
|
36166
36662
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36167
36663
|
exports.hasMixin = exports.decorate = exports.settings = exports.mix = exports.Mixin = undefined;
|
|
36168
36664
|
var mixins_1 = require_mixins();
|
|
@@ -36230,27 +36726,33 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36230
36726
|
BaseSelectMenuBuilder: () => BaseSelectMenuBuilder,
|
|
36231
36727
|
ButtonBuilder: () => ButtonBuilder,
|
|
36232
36728
|
ChannelSelectMenuBuilder: () => ChannelSelectMenuBuilder,
|
|
36729
|
+
CheckboxAssertions: () => Assertions_exports3,
|
|
36730
|
+
CheckboxBuilder: () => CheckboxBuilder,
|
|
36731
|
+
CheckboxGroupBuilder: () => CheckboxGroupBuilder,
|
|
36732
|
+
CheckboxGroupOptionBuilder: () => CheckboxGroupOptionBuilder,
|
|
36233
36733
|
ComponentAssertions: () => Assertions_exports2,
|
|
36234
36734
|
ComponentBuilder: () => ComponentBuilder,
|
|
36235
|
-
ComponentsV2Assertions: () =>
|
|
36735
|
+
ComponentsV2Assertions: () => Assertions_exports8,
|
|
36236
36736
|
ContainerBuilder: () => ContainerBuilder,
|
|
36237
|
-
ContextMenuCommandAssertions: () =>
|
|
36737
|
+
ContextMenuCommandAssertions: () => Assertions_exports11,
|
|
36238
36738
|
ContextMenuCommandBuilder: () => ContextMenuCommandBuilder,
|
|
36239
36739
|
EmbedAssertions: () => Assertions_exports,
|
|
36240
36740
|
EmbedBuilder: () => EmbedBuilder,
|
|
36241
36741
|
FileBuilder: () => FileBuilder,
|
|
36242
|
-
FileUploadAssertions: () =>
|
|
36742
|
+
FileUploadAssertions: () => Assertions_exports4,
|
|
36243
36743
|
FileUploadBuilder: () => FileUploadBuilder,
|
|
36244
|
-
LabelAssertions: () =>
|
|
36744
|
+
LabelAssertions: () => Assertions_exports7,
|
|
36245
36745
|
LabelBuilder: () => LabelBuilder,
|
|
36246
36746
|
MediaGalleryBuilder: () => MediaGalleryBuilder,
|
|
36247
36747
|
MediaGalleryItemBuilder: () => MediaGalleryItemBuilder,
|
|
36248
36748
|
MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder,
|
|
36249
|
-
ModalAssertions: () =>
|
|
36749
|
+
ModalAssertions: () => Assertions_exports9,
|
|
36250
36750
|
ModalBuilder: () => ModalBuilder,
|
|
36751
|
+
RadioGroupBuilder: () => RadioGroupBuilder,
|
|
36752
|
+
RadioGroupOptionBuilder: () => RadioGroupOptionBuilder,
|
|
36251
36753
|
RoleSelectMenuBuilder: () => RoleSelectMenuBuilder,
|
|
36252
36754
|
SectionBuilder: () => SectionBuilder,
|
|
36253
|
-
SelectMenuAssertions: () =>
|
|
36755
|
+
SelectMenuAssertions: () => Assertions_exports6,
|
|
36254
36756
|
SelectMenuBuilder: () => StringSelectMenuBuilder,
|
|
36255
36757
|
SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
|
|
36256
36758
|
SeparatorBuilder: () => SeparatorBuilder,
|
|
@@ -36258,7 +36760,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36258
36760
|
SharedSlashCommand: () => SharedSlashCommand,
|
|
36259
36761
|
SharedSlashCommandOptions: () => SharedSlashCommandOptions,
|
|
36260
36762
|
SharedSlashCommandSubcommands: () => SharedSlashCommandSubcommands,
|
|
36261
|
-
SlashCommandAssertions: () =>
|
|
36763
|
+
SlashCommandAssertions: () => Assertions_exports10,
|
|
36262
36764
|
SlashCommandAttachmentOption: () => SlashCommandAttachmentOption,
|
|
36263
36765
|
SlashCommandBooleanOption: () => SlashCommandBooleanOption,
|
|
36264
36766
|
SlashCommandBuilder: () => SlashCommandBuilder,
|
|
@@ -36274,7 +36776,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36274
36776
|
StringSelectMenuBuilder: () => StringSelectMenuBuilder,
|
|
36275
36777
|
StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
|
|
36276
36778
|
TextDisplayBuilder: () => TextDisplayBuilder,
|
|
36277
|
-
TextInputAssertions: () =>
|
|
36779
|
+
TextInputAssertions: () => Assertions_exports5,
|
|
36278
36780
|
TextInputBuilder: () => TextInputBuilder,
|
|
36279
36781
|
ThumbnailBuilder: () => ThumbnailBuilder,
|
|
36280
36782
|
UserSelectMenuBuilder: () => UserSelectMenuBuilder,
|
|
@@ -36309,7 +36811,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36309
36811
|
urlPredicate: () => urlPredicate,
|
|
36310
36812
|
validateFieldLength: () => validateFieldLength
|
|
36311
36813
|
});
|
|
36312
|
-
var import_shapeshift =
|
|
36814
|
+
var import_shapeshift = require_cjs4();
|
|
36313
36815
|
var validate = true;
|
|
36314
36816
|
function enableValidators() {
|
|
36315
36817
|
return validate = true;
|
|
@@ -36483,7 +36985,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36483
36985
|
validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
|
|
36484
36986
|
validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
|
|
36485
36987
|
});
|
|
36486
|
-
var import_shapeshift2 =
|
|
36988
|
+
var import_shapeshift2 = require_cjs4();
|
|
36487
36989
|
var import_v10 = require_v106();
|
|
36488
36990
|
var StringSelectMenuOptionBuilder = class {
|
|
36489
36991
|
constructor(data = {}) {
|
|
@@ -36585,7 +37087,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36585
37087
|
}
|
|
36586
37088
|
}
|
|
36587
37089
|
__name(validateRequiredButtonParameters, "validateRequiredButtonParameters");
|
|
36588
|
-
var
|
|
37090
|
+
var import_v1028 = require_v106();
|
|
36589
37091
|
var ComponentBuilder = class {
|
|
36590
37092
|
static {
|
|
36591
37093
|
__name(this, "ComponentBuilder");
|
|
@@ -36603,7 +37105,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36603
37105
|
return this;
|
|
36604
37106
|
}
|
|
36605
37107
|
};
|
|
36606
|
-
var
|
|
37108
|
+
var import_v1027 = require_v106();
|
|
36607
37109
|
var import_v102 = require_v106();
|
|
36608
37110
|
var ButtonBuilder = class extends ComponentBuilder {
|
|
36609
37111
|
static {
|
|
@@ -36650,24 +37152,294 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36650
37152
|
var import_v104 = require_v106();
|
|
36651
37153
|
var Assertions_exports3 = {};
|
|
36652
37154
|
__export2(Assertions_exports3, {
|
|
36653
|
-
|
|
37155
|
+
checkboxGroupOptionPredicate: () => checkboxGroupOptionPredicate,
|
|
37156
|
+
checkboxGroupPredicate: () => checkboxGroupPredicate,
|
|
37157
|
+
checkboxPredicate: () => checkboxPredicate,
|
|
37158
|
+
radioGroupOptionPredicate: () => radioGroupOptionPredicate,
|
|
37159
|
+
radioGroupPredicate: () => radioGroupPredicate
|
|
36654
37160
|
});
|
|
36655
|
-
var import_shapeshift3 =
|
|
37161
|
+
var import_shapeshift3 = require_cjs4();
|
|
36656
37162
|
var import_v103 = require_v106();
|
|
36657
|
-
var
|
|
36658
|
-
type: import_shapeshift3.s.literal(import_v103.ComponentType.
|
|
37163
|
+
var checkboxPredicate = import_shapeshift3.s.object({
|
|
37164
|
+
type: import_shapeshift3.s.literal(import_v103.ComponentType.Checkbox),
|
|
37165
|
+
custom_id: customIdValidator,
|
|
36659
37166
|
id: idValidator.optional(),
|
|
37167
|
+
default: import_shapeshift3.s.boolean().optional()
|
|
37168
|
+
}).setValidationEnabled(isValidationEnabled);
|
|
37169
|
+
var checkboxGroupOptionPredicate = import_shapeshift3.s.object({
|
|
37170
|
+
label: import_shapeshift3.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
|
|
37171
|
+
value: import_shapeshift3.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
|
|
37172
|
+
description: import_shapeshift3.s.string().lengthLessThanOrEqual(100).optional(),
|
|
37173
|
+
default: import_shapeshift3.s.boolean().optional()
|
|
37174
|
+
}).setValidationEnabled(isValidationEnabled);
|
|
37175
|
+
var checkboxGroupPredicate = import_shapeshift3.s.object({
|
|
37176
|
+
type: import_shapeshift3.s.literal(import_v103.ComponentType.CheckboxGroup),
|
|
36660
37177
|
custom_id: customIdValidator,
|
|
36661
|
-
|
|
36662
|
-
|
|
37178
|
+
id: idValidator.optional(),
|
|
37179
|
+
options: import_shapeshift3.s.array(checkboxGroupOptionPredicate).lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(10),
|
|
37180
|
+
min_values: import_shapeshift3.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(10).optional(),
|
|
37181
|
+
max_values: import_shapeshift3.s.number().int().greaterThanOrEqual(1).lessThanOrEqual(10).optional(),
|
|
36663
37182
|
required: import_shapeshift3.s.boolean().optional()
|
|
37183
|
+
}).reshape((data) => {
|
|
37184
|
+
if (data.min_values !== undefined && data.max_values !== undefined && data.min_values > data.max_values) {
|
|
37185
|
+
return import_shapeshift3.Result.err(new RangeError("min_values cannot be greater than max_values"));
|
|
37186
|
+
}
|
|
37187
|
+
if (data.max_values !== undefined && data.max_values > data.options.length) {
|
|
37188
|
+
return import_shapeshift3.Result.err(new RangeError("max_values cannot be greater than the number of options"));
|
|
37189
|
+
}
|
|
37190
|
+
if (data.min_values !== undefined && data.min_values > data.options.length) {
|
|
37191
|
+
return import_shapeshift3.Result.err(new RangeError("min_values cannot be greater than the number of options"));
|
|
37192
|
+
}
|
|
37193
|
+
if (data.required === true && data.min_values === 0) {
|
|
37194
|
+
return import_shapeshift3.Result.err(new RangeError("If required is true, min_values must be at least 1"));
|
|
37195
|
+
}
|
|
37196
|
+
const defaultCount = data.options.filter((option) => option.default === true).length;
|
|
37197
|
+
if (data.max_values !== undefined && defaultCount > data.max_values) {
|
|
37198
|
+
return import_shapeshift3.Result.err(new RangeError("The number of default options cannot be greater than max_values"));
|
|
37199
|
+
}
|
|
37200
|
+
const values = data.options.map((option) => option.value);
|
|
37201
|
+
const uniqueValues = new Set(values);
|
|
37202
|
+
if (uniqueValues.size !== values.length) {
|
|
37203
|
+
return import_shapeshift3.Result.err(new RangeError("Each option in a checkbox group must have a unique value"));
|
|
37204
|
+
}
|
|
37205
|
+
return import_shapeshift3.Result.ok(data);
|
|
37206
|
+
}).setValidationEnabled(isValidationEnabled);
|
|
37207
|
+
var radioGroupOptionPredicate = checkboxGroupOptionPredicate;
|
|
37208
|
+
var radioGroupPredicate = import_shapeshift3.s.object({
|
|
37209
|
+
type: import_shapeshift3.s.literal(import_v103.ComponentType.RadioGroup),
|
|
37210
|
+
custom_id: customIdValidator,
|
|
37211
|
+
id: idValidator.optional(),
|
|
37212
|
+
options: import_shapeshift3.s.array(radioGroupOptionPredicate).lengthGreaterThanOrEqual(2).lengthLessThanOrEqual(10),
|
|
37213
|
+
required: import_shapeshift3.s.boolean().optional()
|
|
37214
|
+
}).reshape((data) => {
|
|
37215
|
+
const defaultCount = data.options.filter((option) => option.default === true).length;
|
|
37216
|
+
if (defaultCount > 1) {
|
|
37217
|
+
return import_shapeshift3.Result.err(new RangeError("There can be at most one default option in a radio group"));
|
|
37218
|
+
}
|
|
37219
|
+
const values = data.options.map((option) => option.value);
|
|
37220
|
+
const uniqueValues = new Set(values);
|
|
37221
|
+
if (uniqueValues.size !== values.length) {
|
|
37222
|
+
return import_shapeshift3.Result.err(new RangeError("Each option in a radio group must have a unique value"));
|
|
37223
|
+
}
|
|
37224
|
+
return import_shapeshift3.Result.ok(data);
|
|
37225
|
+
}).setValidationEnabled(isValidationEnabled);
|
|
37226
|
+
var CheckboxBuilder = class extends ComponentBuilder {
|
|
37227
|
+
static {
|
|
37228
|
+
__name(this, "CheckboxBuilder");
|
|
37229
|
+
}
|
|
37230
|
+
constructor(data) {
|
|
37231
|
+
super({ type: import_v104.ComponentType.Checkbox, ...data });
|
|
37232
|
+
}
|
|
37233
|
+
setCustomId(customId) {
|
|
37234
|
+
this.data.custom_id = customId;
|
|
37235
|
+
return this;
|
|
37236
|
+
}
|
|
37237
|
+
setDefault(isDefault) {
|
|
37238
|
+
this.data.default = isDefault;
|
|
37239
|
+
return this;
|
|
37240
|
+
}
|
|
37241
|
+
toJSON() {
|
|
37242
|
+
checkboxPredicate.parse(this.data);
|
|
37243
|
+
return {
|
|
37244
|
+
...this.data
|
|
37245
|
+
};
|
|
37246
|
+
}
|
|
37247
|
+
};
|
|
37248
|
+
var import_v105 = require_v106();
|
|
37249
|
+
var CheckboxGroupOptionBuilder = class {
|
|
37250
|
+
constructor(data = {}) {
|
|
37251
|
+
this.data = data;
|
|
37252
|
+
}
|
|
37253
|
+
static {
|
|
37254
|
+
__name(this, "CheckboxGroupOptionBuilder");
|
|
37255
|
+
}
|
|
37256
|
+
setLabel(label) {
|
|
37257
|
+
this.data.label = label;
|
|
37258
|
+
return this;
|
|
37259
|
+
}
|
|
37260
|
+
setValue(value) {
|
|
37261
|
+
this.data.value = value;
|
|
37262
|
+
return this;
|
|
37263
|
+
}
|
|
37264
|
+
setDescription(description) {
|
|
37265
|
+
this.data.description = description;
|
|
37266
|
+
return this;
|
|
37267
|
+
}
|
|
37268
|
+
setDefault(isDefault) {
|
|
37269
|
+
this.data.default = isDefault;
|
|
37270
|
+
return this;
|
|
37271
|
+
}
|
|
37272
|
+
toJSON() {
|
|
37273
|
+
checkboxGroupOptionPredicate.parse(this.data);
|
|
37274
|
+
return {
|
|
37275
|
+
...this.data
|
|
37276
|
+
};
|
|
37277
|
+
}
|
|
37278
|
+
};
|
|
37279
|
+
var CheckboxGroupBuilder = class extends ComponentBuilder {
|
|
37280
|
+
static {
|
|
37281
|
+
__name(this, "CheckboxGroupBuilder");
|
|
37282
|
+
}
|
|
37283
|
+
options;
|
|
37284
|
+
constructor(data) {
|
|
37285
|
+
const { options, ...initData } = data ?? {};
|
|
37286
|
+
super({ ...initData, type: import_v105.ComponentType.CheckboxGroup });
|
|
37287
|
+
this.options = options?.map((option) => new CheckboxGroupOptionBuilder(option)) ?? [];
|
|
37288
|
+
}
|
|
37289
|
+
setCustomId(customId) {
|
|
37290
|
+
this.data.custom_id = customId;
|
|
37291
|
+
return this;
|
|
37292
|
+
}
|
|
37293
|
+
addOptions(...options) {
|
|
37294
|
+
const normalizedOptions = normalizeArray(options);
|
|
37295
|
+
this.options.push(...normalizedOptions.map((normalizedOption) => {
|
|
37296
|
+
const json = "toJSON" in normalizedOption ? normalizedOption.toJSON() : normalizedOption;
|
|
37297
|
+
const option = new CheckboxGroupOptionBuilder(json);
|
|
37298
|
+
checkboxGroupOptionPredicate.parse(option.toJSON());
|
|
37299
|
+
return option;
|
|
37300
|
+
}));
|
|
37301
|
+
return this;
|
|
37302
|
+
}
|
|
37303
|
+
setOptions(...options) {
|
|
37304
|
+
return this.spliceOptions(0, this.options.length, ...options);
|
|
37305
|
+
}
|
|
37306
|
+
spliceOptions(index, deleteCount, ...options) {
|
|
37307
|
+
const normalizedOptions = normalizeArray(options);
|
|
37308
|
+
const clone = [...this.options];
|
|
37309
|
+
clone.splice(index, deleteCount, ...normalizedOptions.map((normalizedOption) => {
|
|
37310
|
+
const json = "toJSON" in normalizedOption ? normalizedOption.toJSON() : normalizedOption;
|
|
37311
|
+
const option = new CheckboxGroupOptionBuilder(json);
|
|
37312
|
+
checkboxGroupOptionPredicate.parse(option.toJSON());
|
|
37313
|
+
return option;
|
|
37314
|
+
}));
|
|
37315
|
+
this.options.splice(0, this.options.length, ...clone);
|
|
37316
|
+
return this;
|
|
37317
|
+
}
|
|
37318
|
+
setMinValues(minValues) {
|
|
37319
|
+
this.data.min_values = minValues;
|
|
37320
|
+
return this;
|
|
37321
|
+
}
|
|
37322
|
+
setMaxValues(maxValues) {
|
|
37323
|
+
this.data.max_values = maxValues;
|
|
37324
|
+
return this;
|
|
37325
|
+
}
|
|
37326
|
+
setRequired(required) {
|
|
37327
|
+
this.data.required = required;
|
|
37328
|
+
return this;
|
|
37329
|
+
}
|
|
37330
|
+
toJSON() {
|
|
37331
|
+
const data = {
|
|
37332
|
+
...this.data,
|
|
37333
|
+
options: this.options.map((option) => option.toJSON())
|
|
37334
|
+
};
|
|
37335
|
+
checkboxGroupPredicate.parse(data);
|
|
37336
|
+
return data;
|
|
37337
|
+
}
|
|
37338
|
+
};
|
|
37339
|
+
var import_v106 = require_v106();
|
|
37340
|
+
var RadioGroupOptionBuilder = class {
|
|
37341
|
+
constructor(data = {}) {
|
|
37342
|
+
this.data = data;
|
|
37343
|
+
}
|
|
37344
|
+
static {
|
|
37345
|
+
__name(this, "RadioGroupOptionBuilder");
|
|
37346
|
+
}
|
|
37347
|
+
setLabel(label) {
|
|
37348
|
+
this.data.label = label;
|
|
37349
|
+
return this;
|
|
37350
|
+
}
|
|
37351
|
+
setValue(value) {
|
|
37352
|
+
this.data.value = value;
|
|
37353
|
+
return this;
|
|
37354
|
+
}
|
|
37355
|
+
setDescription(description) {
|
|
37356
|
+
this.data.description = description;
|
|
37357
|
+
return this;
|
|
37358
|
+
}
|
|
37359
|
+
setDefault(isDefault) {
|
|
37360
|
+
this.data.default = isDefault;
|
|
37361
|
+
return this;
|
|
37362
|
+
}
|
|
37363
|
+
toJSON() {
|
|
37364
|
+
radioGroupOptionPredicate.parse(this.data);
|
|
37365
|
+
return {
|
|
37366
|
+
...this.data
|
|
37367
|
+
};
|
|
37368
|
+
}
|
|
37369
|
+
};
|
|
37370
|
+
var RadioGroupBuilder = class extends ComponentBuilder {
|
|
37371
|
+
static {
|
|
37372
|
+
__name(this, "RadioGroupBuilder");
|
|
37373
|
+
}
|
|
37374
|
+
options;
|
|
37375
|
+
constructor(data) {
|
|
37376
|
+
const { options, ...initData } = data ?? {};
|
|
37377
|
+
super({ ...initData, type: import_v106.ComponentType.RadioGroup });
|
|
37378
|
+
this.options = options?.map((option) => new RadioGroupOptionBuilder(option)) ?? [];
|
|
37379
|
+
}
|
|
37380
|
+
setCustomId(customId) {
|
|
37381
|
+
this.data.custom_id = customId;
|
|
37382
|
+
return this;
|
|
37383
|
+
}
|
|
37384
|
+
addOptions(...options) {
|
|
37385
|
+
const normalizedOptions = normalizeArray(options);
|
|
37386
|
+
this.options.push(...normalizedOptions.map((normalizedOption) => {
|
|
37387
|
+
const json = "toJSON" in normalizedOption ? normalizedOption.toJSON() : normalizedOption;
|
|
37388
|
+
const option = new RadioGroupOptionBuilder(json);
|
|
37389
|
+
radioGroupOptionPredicate.parse(option.toJSON());
|
|
37390
|
+
return option;
|
|
37391
|
+
}));
|
|
37392
|
+
return this;
|
|
37393
|
+
}
|
|
37394
|
+
setOptions(...options) {
|
|
37395
|
+
return this.spliceOptions(0, this.options.length, ...options);
|
|
37396
|
+
}
|
|
37397
|
+
spliceOptions(index, deleteCount, ...options) {
|
|
37398
|
+
const normalizedOptions = normalizeArray(options);
|
|
37399
|
+
const clone = [...this.options];
|
|
37400
|
+
clone.splice(index, deleteCount, ...normalizedOptions.map((normalizedOption) => {
|
|
37401
|
+
const json = "toJSON" in normalizedOption ? normalizedOption.toJSON() : normalizedOption;
|
|
37402
|
+
const option = new RadioGroupOptionBuilder(json);
|
|
37403
|
+
radioGroupOptionPredicate.parse(option.toJSON());
|
|
37404
|
+
return option;
|
|
37405
|
+
}));
|
|
37406
|
+
this.options.splice(0, this.options.length, ...clone);
|
|
37407
|
+
return this;
|
|
37408
|
+
}
|
|
37409
|
+
setRequired(required) {
|
|
37410
|
+
this.data.required = required;
|
|
37411
|
+
return this;
|
|
37412
|
+
}
|
|
37413
|
+
toJSON() {
|
|
37414
|
+
const data = {
|
|
37415
|
+
...this.data,
|
|
37416
|
+
options: this.options.map((option) => option.toJSON())
|
|
37417
|
+
};
|
|
37418
|
+
radioGroupPredicate.parse(data);
|
|
37419
|
+
return data;
|
|
37420
|
+
}
|
|
37421
|
+
};
|
|
37422
|
+
var import_v108 = require_v106();
|
|
37423
|
+
var Assertions_exports4 = {};
|
|
37424
|
+
__export2(Assertions_exports4, {
|
|
37425
|
+
fileUploadPredicate: () => fileUploadPredicate
|
|
37426
|
+
});
|
|
37427
|
+
var import_shapeshift4 = require_cjs4();
|
|
37428
|
+
var import_v107 = require_v106();
|
|
37429
|
+
var fileUploadPredicate = import_shapeshift4.s.object({
|
|
37430
|
+
type: import_shapeshift4.s.literal(import_v107.ComponentType.FileUpload),
|
|
37431
|
+
id: idValidator.optional(),
|
|
37432
|
+
custom_id: customIdValidator,
|
|
37433
|
+
min_values: import_shapeshift4.s.number().greaterThanOrEqual(0).lessThanOrEqual(10).optional(),
|
|
37434
|
+
max_values: import_shapeshift4.s.number().greaterThanOrEqual(1).lessThanOrEqual(10).optional(),
|
|
37435
|
+
required: import_shapeshift4.s.boolean().optional()
|
|
36664
37436
|
});
|
|
36665
37437
|
var FileUploadBuilder = class extends ComponentBuilder {
|
|
36666
37438
|
static {
|
|
36667
37439
|
__name(this, "FileUploadBuilder");
|
|
36668
37440
|
}
|
|
36669
37441
|
constructor(data = {}) {
|
|
36670
|
-
super({ type:
|
|
37442
|
+
super({ type: import_v108.ComponentType.FileUpload, ...data });
|
|
36671
37443
|
}
|
|
36672
37444
|
setCustomId(customId) {
|
|
36673
37445
|
this.data.custom_id = customId;
|
|
@@ -36698,10 +37470,10 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36698
37470
|
return this.data;
|
|
36699
37471
|
}
|
|
36700
37472
|
};
|
|
36701
|
-
var
|
|
36702
|
-
var
|
|
36703
|
-
var
|
|
36704
|
-
__export2(
|
|
37473
|
+
var import_v1018 = require_v106();
|
|
37474
|
+
var import_v1010 = require_v106();
|
|
37475
|
+
var Assertions_exports5 = {};
|
|
37476
|
+
__export2(Assertions_exports5, {
|
|
36705
37477
|
labelValidator: () => labelValidator,
|
|
36706
37478
|
maxLengthValidator: () => maxLengthValidator,
|
|
36707
37479
|
minLengthValidator: () => minLengthValidator,
|
|
@@ -36712,17 +37484,17 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36712
37484
|
validateRequiredParameters: () => validateRequiredParameters,
|
|
36713
37485
|
valueValidator: () => valueValidator
|
|
36714
37486
|
});
|
|
36715
|
-
var
|
|
36716
|
-
var
|
|
36717
|
-
var textInputStyleValidator =
|
|
36718
|
-
var minLengthValidator =
|
|
36719
|
-
var maxLengthValidator =
|
|
36720
|
-
var requiredValidator =
|
|
36721
|
-
var valueValidator =
|
|
36722
|
-
var placeholderValidator2 =
|
|
36723
|
-
var labelValidator =
|
|
36724
|
-
var textInputPredicate =
|
|
36725
|
-
type:
|
|
37487
|
+
var import_shapeshift5 = require_cjs4();
|
|
37488
|
+
var import_v109 = require_v106();
|
|
37489
|
+
var textInputStyleValidator = import_shapeshift5.s.nativeEnum(import_v109.TextInputStyle).setValidationEnabled(isValidationEnabled);
|
|
37490
|
+
var minLengthValidator = import_shapeshift5.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(4000).setValidationEnabled(isValidationEnabled);
|
|
37491
|
+
var maxLengthValidator = import_shapeshift5.s.number().int().greaterThanOrEqual(1).lessThanOrEqual(4000).setValidationEnabled(isValidationEnabled);
|
|
37492
|
+
var requiredValidator = import_shapeshift5.s.boolean().setValidationEnabled(isValidationEnabled);
|
|
37493
|
+
var valueValidator = import_shapeshift5.s.string().lengthLessThanOrEqual(4000).setValidationEnabled(isValidationEnabled);
|
|
37494
|
+
var placeholderValidator2 = import_shapeshift5.s.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
|
|
37495
|
+
var labelValidator = import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
|
|
37496
|
+
var textInputPredicate = import_shapeshift5.s.object({
|
|
37497
|
+
type: import_shapeshift5.s.literal(import_v109.ComponentType.TextInput),
|
|
36726
37498
|
custom_id: customIdValidator,
|
|
36727
37499
|
style: textInputStyleValidator,
|
|
36728
37500
|
id: idValidator.optional(),
|
|
@@ -36777,7 +37549,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36777
37549
|
__name(this, "ChannelSelectMenuBuilder");
|
|
36778
37550
|
}
|
|
36779
37551
|
constructor(data) {
|
|
36780
|
-
super({ ...data, type:
|
|
37552
|
+
super({ ...data, type: import_v1010.ComponentType.ChannelSelect });
|
|
36781
37553
|
}
|
|
36782
37554
|
addChannelTypes(...types) {
|
|
36783
37555
|
const normalizedTypes = normalizeArray(types);
|
|
@@ -36797,7 +37569,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36797
37569
|
this.data.default_values ??= [];
|
|
36798
37570
|
this.data.default_values.push(...normalizedValues.map((id) => ({
|
|
36799
37571
|
id,
|
|
36800
|
-
type:
|
|
37572
|
+
type: import_v1010.SelectMenuDefaultValueType.Channel
|
|
36801
37573
|
})));
|
|
36802
37574
|
return this;
|
|
36803
37575
|
}
|
|
@@ -36806,7 +37578,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36806
37578
|
optionsLengthValidator.parse(normalizedValues.length);
|
|
36807
37579
|
this.data.default_values = normalizedValues.map((id) => ({
|
|
36808
37580
|
id,
|
|
36809
|
-
type:
|
|
37581
|
+
type: import_v1010.SelectMenuDefaultValueType.Channel
|
|
36810
37582
|
}));
|
|
36811
37583
|
return this;
|
|
36812
37584
|
}
|
|
@@ -36817,13 +37589,13 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36817
37589
|
};
|
|
36818
37590
|
}
|
|
36819
37591
|
};
|
|
36820
|
-
var
|
|
37592
|
+
var import_v1011 = require_v106();
|
|
36821
37593
|
var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder {
|
|
36822
37594
|
static {
|
|
36823
37595
|
__name(this, "MentionableSelectMenuBuilder");
|
|
36824
37596
|
}
|
|
36825
37597
|
constructor(data) {
|
|
36826
|
-
super({ ...data, type:
|
|
37598
|
+
super({ ...data, type: import_v1011.ComponentType.MentionableSelect });
|
|
36827
37599
|
}
|
|
36828
37600
|
addDefaultRoles(...roles) {
|
|
36829
37601
|
const normalizedValues = normalizeArray(roles);
|
|
@@ -36831,7 +37603,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36831
37603
|
this.data.default_values ??= [];
|
|
36832
37604
|
this.data.default_values.push(...normalizedValues.map((id) => ({
|
|
36833
37605
|
id,
|
|
36834
|
-
type:
|
|
37606
|
+
type: import_v1011.SelectMenuDefaultValueType.Role
|
|
36835
37607
|
})));
|
|
36836
37608
|
return this;
|
|
36837
37609
|
}
|
|
@@ -36841,7 +37613,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36841
37613
|
this.data.default_values ??= [];
|
|
36842
37614
|
this.data.default_values.push(...normalizedValues.map((id) => ({
|
|
36843
37615
|
id,
|
|
36844
|
-
type:
|
|
37616
|
+
type: import_v1011.SelectMenuDefaultValueType.User
|
|
36845
37617
|
})));
|
|
36846
37618
|
return this;
|
|
36847
37619
|
}
|
|
@@ -36859,13 +37631,13 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36859
37631
|
return this;
|
|
36860
37632
|
}
|
|
36861
37633
|
};
|
|
36862
|
-
var
|
|
37634
|
+
var import_v1012 = require_v106();
|
|
36863
37635
|
var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
|
|
36864
37636
|
static {
|
|
36865
37637
|
__name(this, "RoleSelectMenuBuilder");
|
|
36866
37638
|
}
|
|
36867
37639
|
constructor(data) {
|
|
36868
|
-
super({ ...data, type:
|
|
37640
|
+
super({ ...data, type: import_v1012.ComponentType.RoleSelect });
|
|
36869
37641
|
}
|
|
36870
37642
|
addDefaultRoles(...roles) {
|
|
36871
37643
|
const normalizedValues = normalizeArray(roles);
|
|
@@ -36873,7 +37645,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36873
37645
|
this.data.default_values ??= [];
|
|
36874
37646
|
this.data.default_values.push(...normalizedValues.map((id) => ({
|
|
36875
37647
|
id,
|
|
36876
|
-
type:
|
|
37648
|
+
type: import_v1012.SelectMenuDefaultValueType.Role
|
|
36877
37649
|
})));
|
|
36878
37650
|
return this;
|
|
36879
37651
|
}
|
|
@@ -36882,14 +37654,14 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36882
37654
|
optionsLengthValidator.parse(normalizedValues.length);
|
|
36883
37655
|
this.data.default_values = normalizedValues.map((id) => ({
|
|
36884
37656
|
id,
|
|
36885
|
-
type:
|
|
37657
|
+
type: import_v1012.SelectMenuDefaultValueType.Role
|
|
36886
37658
|
}));
|
|
36887
37659
|
return this;
|
|
36888
37660
|
}
|
|
36889
37661
|
};
|
|
36890
|
-
var
|
|
36891
|
-
var
|
|
36892
|
-
__export2(
|
|
37662
|
+
var import_v1014 = require_v106();
|
|
37663
|
+
var Assertions_exports6 = {};
|
|
37664
|
+
__export2(Assertions_exports6, {
|
|
36893
37665
|
selectMenuChannelPredicate: () => selectMenuChannelPredicate,
|
|
36894
37666
|
selectMenuMentionablePredicate: () => selectMenuMentionablePredicate,
|
|
36895
37667
|
selectMenuRolePredicate: () => selectMenuRolePredicate,
|
|
@@ -36897,54 +37669,54 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36897
37669
|
selectMenuStringPredicate: () => selectMenuStringPredicate,
|
|
36898
37670
|
selectMenuUserPredicate: () => selectMenuUserPredicate
|
|
36899
37671
|
});
|
|
36900
|
-
var
|
|
36901
|
-
var
|
|
36902
|
-
var selectMenuBasePredicate =
|
|
37672
|
+
var import_shapeshift6 = require_cjs4();
|
|
37673
|
+
var import_v1013 = require_v106();
|
|
37674
|
+
var selectMenuBasePredicate = import_shapeshift6.s.object({
|
|
36903
37675
|
id: idValidator.optional(),
|
|
36904
|
-
placeholder:
|
|
36905
|
-
min_values:
|
|
36906
|
-
max_values:
|
|
37676
|
+
placeholder: import_shapeshift6.s.string().lengthLessThanOrEqual(150).optional(),
|
|
37677
|
+
min_values: import_shapeshift6.s.number().greaterThanOrEqual(0).lessThanOrEqual(25).optional(),
|
|
37678
|
+
max_values: import_shapeshift6.s.number().greaterThanOrEqual(0).lessThanOrEqual(25).optional(),
|
|
36907
37679
|
custom_id: customIdValidator,
|
|
36908
|
-
disabled:
|
|
37680
|
+
disabled: import_shapeshift6.s.boolean().optional()
|
|
36909
37681
|
});
|
|
36910
37682
|
var selectMenuChannelPredicate = selectMenuBasePredicate.extend({
|
|
36911
|
-
type:
|
|
36912
|
-
channel_types:
|
|
36913
|
-
default_values:
|
|
37683
|
+
type: import_shapeshift6.s.literal(import_v1013.ComponentType.ChannelSelect),
|
|
37684
|
+
channel_types: import_shapeshift6.s.nativeEnum(import_v1013.ChannelType).array().optional(),
|
|
37685
|
+
default_values: import_shapeshift6.s.object({ id: import_shapeshift6.s.string(), type: import_shapeshift6.s.literal(import_v1013.SelectMenuDefaultValueType.Channel) }).array().lengthLessThanOrEqual(25).optional()
|
|
36914
37686
|
}).setValidationEnabled(isValidationEnabled);
|
|
36915
37687
|
var selectMenuMentionablePredicate = selectMenuBasePredicate.extend({
|
|
36916
|
-
type:
|
|
36917
|
-
default_values:
|
|
36918
|
-
id:
|
|
36919
|
-
type:
|
|
37688
|
+
type: import_shapeshift6.s.literal(import_v1013.ComponentType.MentionableSelect),
|
|
37689
|
+
default_values: import_shapeshift6.s.object({
|
|
37690
|
+
id: import_shapeshift6.s.string(),
|
|
37691
|
+
type: import_shapeshift6.s.union([import_shapeshift6.s.literal(import_v1013.SelectMenuDefaultValueType.Role), import_shapeshift6.s.literal(import_v1013.SelectMenuDefaultValueType.User)])
|
|
36920
37692
|
}).array().lengthLessThanOrEqual(25).optional()
|
|
36921
37693
|
}).setValidationEnabled(isValidationEnabled);
|
|
36922
37694
|
var selectMenuRolePredicate = selectMenuBasePredicate.extend({
|
|
36923
|
-
type:
|
|
36924
|
-
default_values:
|
|
37695
|
+
type: import_shapeshift6.s.literal(import_v1013.ComponentType.RoleSelect),
|
|
37696
|
+
default_values: import_shapeshift6.s.object({ id: import_shapeshift6.s.string(), type: import_shapeshift6.s.literal(import_v1013.SelectMenuDefaultValueType.Role) }).array().lengthLessThanOrEqual(25).optional()
|
|
36925
37697
|
}).setValidationEnabled(isValidationEnabled);
|
|
36926
37698
|
var selectMenuUserPredicate = selectMenuBasePredicate.extend({
|
|
36927
|
-
type:
|
|
36928
|
-
default_values:
|
|
37699
|
+
type: import_shapeshift6.s.literal(import_v1013.ComponentType.UserSelect),
|
|
37700
|
+
default_values: import_shapeshift6.s.object({ id: import_shapeshift6.s.string(), type: import_shapeshift6.s.literal(import_v1013.SelectMenuDefaultValueType.User) }).array().lengthLessThanOrEqual(25).optional()
|
|
36929
37701
|
}).setValidationEnabled(isValidationEnabled);
|
|
36930
|
-
var selectMenuStringOptionPredicate =
|
|
36931
|
-
label:
|
|
36932
|
-
value:
|
|
36933
|
-
description:
|
|
37702
|
+
var selectMenuStringOptionPredicate = import_shapeshift6.s.object({
|
|
37703
|
+
label: import_shapeshift6.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
|
|
37704
|
+
value: import_shapeshift6.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
|
|
37705
|
+
description: import_shapeshift6.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).optional(),
|
|
36934
37706
|
emoji: emojiValidator.optional(),
|
|
36935
|
-
default:
|
|
37707
|
+
default: import_shapeshift6.s.boolean().optional()
|
|
36936
37708
|
}).setValidationEnabled(isValidationEnabled);
|
|
36937
37709
|
var selectMenuStringPredicate = selectMenuBasePredicate.extend({
|
|
36938
|
-
type:
|
|
37710
|
+
type: import_shapeshift6.s.literal(import_v1013.ComponentType.StringSelect),
|
|
36939
37711
|
options: selectMenuStringOptionPredicate.array().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(25)
|
|
36940
37712
|
}).reshape((value) => {
|
|
36941
37713
|
if (value.min_values !== undefined && value.options.length < value.min_values) {
|
|
36942
|
-
return
|
|
37714
|
+
return import_shapeshift6.Result.err(new RangeError(`The number of options must be greater than or equal to min_values`));
|
|
36943
37715
|
}
|
|
36944
37716
|
if (value.min_values !== undefined && value.max_values !== undefined && value.min_values > value.max_values) {
|
|
36945
|
-
return
|
|
37717
|
+
return import_shapeshift6.Result.err(new RangeError(`The maximum amount of options must be greater than or equal to the minimum amount of options`));
|
|
36946
37718
|
}
|
|
36947
|
-
return
|
|
37719
|
+
return import_shapeshift6.Result.ok(value);
|
|
36948
37720
|
}).setValidationEnabled(isValidationEnabled);
|
|
36949
37721
|
var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
|
|
36950
37722
|
static {
|
|
@@ -36953,7 +37725,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36953
37725
|
options;
|
|
36954
37726
|
constructor(data) {
|
|
36955
37727
|
const { options, ...initData } = data ?? {};
|
|
36956
|
-
super({ ...initData, type:
|
|
37728
|
+
super({ ...initData, type: import_v1014.ComponentType.StringSelect });
|
|
36957
37729
|
this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? [];
|
|
36958
37730
|
}
|
|
36959
37731
|
addOptions(...options) {
|
|
@@ -36981,13 +37753,13 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36981
37753
|
};
|
|
36982
37754
|
}
|
|
36983
37755
|
};
|
|
36984
|
-
var
|
|
37756
|
+
var import_v1015 = require_v106();
|
|
36985
37757
|
var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder {
|
|
36986
37758
|
static {
|
|
36987
37759
|
__name(this, "UserSelectMenuBuilder");
|
|
36988
37760
|
}
|
|
36989
37761
|
constructor(data) {
|
|
36990
|
-
super({ ...data, type:
|
|
37762
|
+
super({ ...data, type: import_v1015.ComponentType.UserSelect });
|
|
36991
37763
|
}
|
|
36992
37764
|
addDefaultUsers(...users) {
|
|
36993
37765
|
const normalizedValues = normalizeArray(users);
|
|
@@ -36995,7 +37767,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
36995
37767
|
this.data.default_values ??= [];
|
|
36996
37768
|
this.data.default_values.push(...normalizedValues.map((id) => ({
|
|
36997
37769
|
id,
|
|
36998
|
-
type:
|
|
37770
|
+
type: import_v1015.SelectMenuDefaultValueType.User
|
|
36999
37771
|
})));
|
|
37000
37772
|
return this;
|
|
37001
37773
|
}
|
|
@@ -37004,20 +37776,20 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37004
37776
|
optionsLengthValidator.parse(normalizedValues.length);
|
|
37005
37777
|
this.data.default_values = normalizedValues.map((id) => ({
|
|
37006
37778
|
id,
|
|
37007
|
-
type:
|
|
37779
|
+
type: import_v1015.SelectMenuDefaultValueType.User
|
|
37008
37780
|
}));
|
|
37009
37781
|
return this;
|
|
37010
37782
|
}
|
|
37011
37783
|
};
|
|
37012
37784
|
var import_util = require_dist();
|
|
37013
|
-
var
|
|
37785
|
+
var import_v1016 = require_v106();
|
|
37014
37786
|
var import_fast_deep_equal = __toESM2(require_fast_deep_equal());
|
|
37015
37787
|
var TextInputBuilder = class extends ComponentBuilder {
|
|
37016
37788
|
static {
|
|
37017
37789
|
__name(this, "TextInputBuilder");
|
|
37018
37790
|
}
|
|
37019
37791
|
constructor(data) {
|
|
37020
|
-
super({ type:
|
|
37792
|
+
super({ type: import_v1016.ComponentType.TextInput, ...data });
|
|
37021
37793
|
}
|
|
37022
37794
|
setCustomId(customId) {
|
|
37023
37795
|
this.data.custom_id = customIdValidator.parse(customId);
|
|
@@ -37064,25 +37836,28 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37064
37836
|
return (0, import_fast_deep_equal.default)(other, this.data);
|
|
37065
37837
|
}
|
|
37066
37838
|
};
|
|
37067
|
-
var
|
|
37068
|
-
__export2(
|
|
37839
|
+
var Assertions_exports7 = {};
|
|
37840
|
+
__export2(Assertions_exports7, {
|
|
37069
37841
|
labelPredicate: () => labelPredicate
|
|
37070
37842
|
});
|
|
37071
|
-
var
|
|
37072
|
-
var
|
|
37073
|
-
var labelPredicate =
|
|
37843
|
+
var import_shapeshift7 = require_cjs4();
|
|
37844
|
+
var import_v1017 = require_v106();
|
|
37845
|
+
var labelPredicate = import_shapeshift7.s.object({
|
|
37074
37846
|
id: idValidator.optional(),
|
|
37075
|
-
type:
|
|
37076
|
-
label:
|
|
37077
|
-
description:
|
|
37078
|
-
component:
|
|
37847
|
+
type: import_shapeshift7.s.literal(import_v1017.ComponentType.Label),
|
|
37848
|
+
label: import_shapeshift7.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45),
|
|
37849
|
+
description: import_shapeshift7.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).optional(),
|
|
37850
|
+
component: import_shapeshift7.s.union([
|
|
37079
37851
|
textInputPredicate,
|
|
37080
37852
|
selectMenuUserPredicate,
|
|
37081
37853
|
selectMenuRolePredicate,
|
|
37082
37854
|
selectMenuMentionablePredicate,
|
|
37083
37855
|
selectMenuChannelPredicate,
|
|
37084
37856
|
selectMenuStringPredicate,
|
|
37085
|
-
fileUploadPredicate
|
|
37857
|
+
fileUploadPredicate,
|
|
37858
|
+
checkboxPredicate,
|
|
37859
|
+
checkboxGroupPredicate,
|
|
37860
|
+
radioGroupPredicate
|
|
37086
37861
|
])
|
|
37087
37862
|
}).setValidationEnabled(isValidationEnabled);
|
|
37088
37863
|
var LabelBuilder = class extends ComponentBuilder {
|
|
@@ -37091,12 +37866,12 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37091
37866
|
}
|
|
37092
37867
|
data;
|
|
37093
37868
|
constructor(data = {}) {
|
|
37094
|
-
super({ type:
|
|
37869
|
+
super({ type: import_v1018.ComponentType.Label });
|
|
37095
37870
|
const { component, ...rest } = data;
|
|
37096
37871
|
this.data = {
|
|
37097
37872
|
...rest,
|
|
37098
37873
|
component: component ? createComponentBuilder(component) : undefined,
|
|
37099
|
-
type:
|
|
37874
|
+
type: import_v1018.ComponentType.Label
|
|
37100
37875
|
};
|
|
37101
37876
|
}
|
|
37102
37877
|
setLabel(label) {
|
|
@@ -37139,6 +37914,18 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37139
37914
|
this.data.component = resolveBuilder(input, FileUploadBuilder);
|
|
37140
37915
|
return this;
|
|
37141
37916
|
}
|
|
37917
|
+
setCheckboxComponent(input) {
|
|
37918
|
+
this.data.component = resolveBuilder(input, CheckboxBuilder);
|
|
37919
|
+
return this;
|
|
37920
|
+
}
|
|
37921
|
+
setCheckboxGroupComponent(input) {
|
|
37922
|
+
this.data.component = resolveBuilder(input, CheckboxGroupBuilder);
|
|
37923
|
+
return this;
|
|
37924
|
+
}
|
|
37925
|
+
setRadioGroupComponent(input) {
|
|
37926
|
+
this.data.component = resolveBuilder(input, RadioGroupBuilder);
|
|
37927
|
+
return this;
|
|
37928
|
+
}
|
|
37142
37929
|
toJSON() {
|
|
37143
37930
|
const { component, ...rest } = this.data;
|
|
37144
37931
|
const data = {
|
|
@@ -37149,9 +37936,9 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37149
37936
|
return data;
|
|
37150
37937
|
}
|
|
37151
37938
|
};
|
|
37152
|
-
var
|
|
37153
|
-
var
|
|
37154
|
-
__export2(
|
|
37939
|
+
var import_v1024 = require_v106();
|
|
37940
|
+
var Assertions_exports8 = {};
|
|
37941
|
+
__export2(Assertions_exports8, {
|
|
37155
37942
|
accessoryPredicate: () => accessoryPredicate,
|
|
37156
37943
|
assertReturnOfBuilder: () => assertReturnOfBuilder,
|
|
37157
37944
|
containerColorPredicate: () => containerColorPredicate,
|
|
@@ -37164,16 +37951,16 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37164
37951
|
unfurledMediaItemPredicate: () => unfurledMediaItemPredicate,
|
|
37165
37952
|
validateComponentArray: () => validateComponentArray
|
|
37166
37953
|
});
|
|
37167
|
-
var
|
|
37168
|
-
var
|
|
37169
|
-
var
|
|
37954
|
+
var import_shapeshift8 = require_cjs4();
|
|
37955
|
+
var import_v1020 = require_v106();
|
|
37956
|
+
var import_v1019 = require_v106();
|
|
37170
37957
|
var ThumbnailBuilder = class extends ComponentBuilder {
|
|
37171
37958
|
static {
|
|
37172
37959
|
__name(this, "ThumbnailBuilder");
|
|
37173
37960
|
}
|
|
37174
37961
|
constructor(data = {}) {
|
|
37175
37962
|
super({
|
|
37176
|
-
type:
|
|
37963
|
+
type: import_v1019.ComponentType.Thumbnail,
|
|
37177
37964
|
...data,
|
|
37178
37965
|
media: data.media ? { url: data.media.url } : undefined
|
|
37179
37966
|
});
|
|
@@ -37199,34 +37986,34 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37199
37986
|
return { ...this.data };
|
|
37200
37987
|
}
|
|
37201
37988
|
};
|
|
37202
|
-
var unfurledMediaItemPredicate =
|
|
37203
|
-
url:
|
|
37989
|
+
var unfurledMediaItemPredicate = import_shapeshift8.s.object({
|
|
37990
|
+
url: import_shapeshift8.s.string().url({ allowedProtocols: ["http:", "https:", "attachment:"] }, { message: "Invalid protocol for media URL. Must be http:, https:, or attachment:" })
|
|
37204
37991
|
}).setValidationEnabled(isValidationEnabled);
|
|
37205
|
-
var descriptionPredicate2 =
|
|
37206
|
-
var filePredicate =
|
|
37207
|
-
url:
|
|
37992
|
+
var descriptionPredicate2 = import_shapeshift8.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
|
|
37993
|
+
var filePredicate = import_shapeshift8.s.object({
|
|
37994
|
+
url: import_shapeshift8.s.string().url({ allowedProtocols: ["attachment:"] }, { message: "Invalid protocol for file URL. Must be attachment:" })
|
|
37208
37995
|
}).setValidationEnabled(isValidationEnabled);
|
|
37209
|
-
var spoilerPredicate =
|
|
37210
|
-
var dividerPredicate =
|
|
37211
|
-
var spacingPredicate =
|
|
37212
|
-
var textDisplayContentPredicate =
|
|
37213
|
-
var accessoryPredicate =
|
|
37996
|
+
var spoilerPredicate = import_shapeshift8.s.boolean();
|
|
37997
|
+
var dividerPredicate = import_shapeshift8.s.boolean();
|
|
37998
|
+
var spacingPredicate = import_shapeshift8.s.nativeEnum(import_v1020.SeparatorSpacingSize);
|
|
37999
|
+
var textDisplayContentPredicate = import_shapeshift8.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4000).setValidationEnabled(isValidationEnabled);
|
|
38000
|
+
var accessoryPredicate = import_shapeshift8.s.instance(ButtonBuilder).or(import_shapeshift8.s.instance(ThumbnailBuilder)).setValidationEnabled(isValidationEnabled);
|
|
37214
38001
|
var containerColorPredicate = colorPredicate.nullish();
|
|
37215
38002
|
function assertReturnOfBuilder(input, ExpectedInstanceOf) {
|
|
37216
|
-
|
|
38003
|
+
import_shapeshift8.s.instance(ExpectedInstanceOf).setValidationEnabled(isValidationEnabled).parse(input);
|
|
37217
38004
|
}
|
|
37218
38005
|
__name(assertReturnOfBuilder, "assertReturnOfBuilder");
|
|
37219
38006
|
function validateComponentArray(input, min, max, ExpectedInstanceOf) {
|
|
37220
|
-
(ExpectedInstanceOf ?
|
|
38007
|
+
(ExpectedInstanceOf ? import_shapeshift8.s.instance(ExpectedInstanceOf) : import_shapeshift8.s.instance(ComponentBuilder)).array().lengthGreaterThanOrEqual(min).lengthLessThanOrEqual(max).setValidationEnabled(isValidationEnabled).parse(input);
|
|
37221
38008
|
}
|
|
37222
38009
|
__name(validateComponentArray, "validateComponentArray");
|
|
37223
|
-
var
|
|
38010
|
+
var import_v1021 = require_v106();
|
|
37224
38011
|
var FileBuilder = class extends ComponentBuilder {
|
|
37225
38012
|
static {
|
|
37226
38013
|
__name(this, "FileBuilder");
|
|
37227
38014
|
}
|
|
37228
38015
|
constructor(data = {}) {
|
|
37229
|
-
super({ type:
|
|
38016
|
+
super({ type: import_v1021.ComponentType.File, ...data, file: data.file ? { url: data.file.url } : undefined });
|
|
37230
38017
|
}
|
|
37231
38018
|
setSpoiler(spoiler = true) {
|
|
37232
38019
|
this.data.spoiler = spoilerPredicate.parse(spoiler);
|
|
@@ -37241,14 +38028,14 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37241
38028
|
return { ...this.data, file: { ...this.data.file } };
|
|
37242
38029
|
}
|
|
37243
38030
|
};
|
|
37244
|
-
var
|
|
38031
|
+
var import_v1022 = require_v106();
|
|
37245
38032
|
var SeparatorBuilder = class extends ComponentBuilder {
|
|
37246
38033
|
static {
|
|
37247
38034
|
__name(this, "SeparatorBuilder");
|
|
37248
38035
|
}
|
|
37249
38036
|
constructor(data = {}) {
|
|
37250
38037
|
super({
|
|
37251
|
-
type:
|
|
38038
|
+
type: import_v1022.ComponentType.Separator,
|
|
37252
38039
|
...data
|
|
37253
38040
|
});
|
|
37254
38041
|
}
|
|
@@ -37268,14 +38055,14 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37268
38055
|
return { ...this.data };
|
|
37269
38056
|
}
|
|
37270
38057
|
};
|
|
37271
|
-
var
|
|
38058
|
+
var import_v1023 = require_v106();
|
|
37272
38059
|
var TextDisplayBuilder = class extends ComponentBuilder {
|
|
37273
38060
|
static {
|
|
37274
38061
|
__name(this, "TextDisplayBuilder");
|
|
37275
38062
|
}
|
|
37276
38063
|
constructor(data = {}) {
|
|
37277
38064
|
super({
|
|
37278
|
-
type:
|
|
38065
|
+
type: import_v1023.ComponentType.TextDisplay,
|
|
37279
38066
|
...data
|
|
37280
38067
|
});
|
|
37281
38068
|
}
|
|
@@ -37294,7 +38081,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37294
38081
|
}
|
|
37295
38082
|
components;
|
|
37296
38083
|
constructor({ components, ...data } = {}) {
|
|
37297
|
-
super({ type:
|
|
38084
|
+
super({ type: import_v1024.ComponentType.Container, ...data });
|
|
37298
38085
|
this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
|
|
37299
38086
|
}
|
|
37300
38087
|
setAccentColor(color) {
|
|
@@ -37350,7 +38137,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37350
38137
|
};
|
|
37351
38138
|
}
|
|
37352
38139
|
};
|
|
37353
|
-
var
|
|
38140
|
+
var import_v1025 = require_v106();
|
|
37354
38141
|
var MediaGalleryItemBuilder = class {
|
|
37355
38142
|
static {
|
|
37356
38143
|
__name(this, "MediaGalleryItemBuilder");
|
|
@@ -37386,7 +38173,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37386
38173
|
}
|
|
37387
38174
|
items;
|
|
37388
38175
|
constructor({ items, ...data } = {}) {
|
|
37389
|
-
super({ type:
|
|
38176
|
+
super({ type: import_v1025.ComponentType.MediaGallery, ...data });
|
|
37390
38177
|
this.items = items?.map((item) => new MediaGalleryItemBuilder(item)) ?? [];
|
|
37391
38178
|
}
|
|
37392
38179
|
addItems(...items) {
|
|
@@ -37413,7 +38200,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37413
38200
|
};
|
|
37414
38201
|
}
|
|
37415
38202
|
};
|
|
37416
|
-
var
|
|
38203
|
+
var import_v1026 = require_v106();
|
|
37417
38204
|
var SectionBuilder = class extends ComponentBuilder {
|
|
37418
38205
|
static {
|
|
37419
38206
|
__name(this, "SectionBuilder");
|
|
@@ -37421,7 +38208,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37421
38208
|
components;
|
|
37422
38209
|
accessory;
|
|
37423
38210
|
constructor({ components, accessory, ...data } = {}) {
|
|
37424
|
-
super({ type:
|
|
38211
|
+
super({ type: import_v1026.ComponentType.Section, ...data });
|
|
37425
38212
|
this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
|
|
37426
38213
|
this.accessory = accessory ? createComponentBuilder(accessory) : undefined;
|
|
37427
38214
|
}
|
|
@@ -37463,40 +38250,46 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37463
38250
|
return data;
|
|
37464
38251
|
}
|
|
37465
38252
|
switch (data.type) {
|
|
37466
|
-
case
|
|
38253
|
+
case import_v1027.ComponentType.ActionRow:
|
|
37467
38254
|
return new ActionRowBuilder(data);
|
|
37468
|
-
case
|
|
38255
|
+
case import_v1027.ComponentType.Button:
|
|
37469
38256
|
return new ButtonBuilder(data);
|
|
37470
|
-
case
|
|
38257
|
+
case import_v1027.ComponentType.StringSelect:
|
|
37471
38258
|
return new StringSelectMenuBuilder(data);
|
|
37472
|
-
case
|
|
38259
|
+
case import_v1027.ComponentType.TextInput:
|
|
37473
38260
|
return new TextInputBuilder(data);
|
|
37474
|
-
case
|
|
38261
|
+
case import_v1027.ComponentType.UserSelect:
|
|
37475
38262
|
return new UserSelectMenuBuilder(data);
|
|
37476
|
-
case
|
|
38263
|
+
case import_v1027.ComponentType.RoleSelect:
|
|
37477
38264
|
return new RoleSelectMenuBuilder(data);
|
|
37478
|
-
case
|
|
38265
|
+
case import_v1027.ComponentType.MentionableSelect:
|
|
37479
38266
|
return new MentionableSelectMenuBuilder(data);
|
|
37480
|
-
case
|
|
38267
|
+
case import_v1027.ComponentType.ChannelSelect:
|
|
37481
38268
|
return new ChannelSelectMenuBuilder(data);
|
|
37482
|
-
case
|
|
38269
|
+
case import_v1027.ComponentType.File:
|
|
37483
38270
|
return new FileBuilder(data);
|
|
37484
|
-
case
|
|
38271
|
+
case import_v1027.ComponentType.Container:
|
|
37485
38272
|
return new ContainerBuilder(data);
|
|
37486
|
-
case
|
|
38273
|
+
case import_v1027.ComponentType.Section:
|
|
37487
38274
|
return new SectionBuilder(data);
|
|
37488
|
-
case
|
|
38275
|
+
case import_v1027.ComponentType.Separator:
|
|
37489
38276
|
return new SeparatorBuilder(data);
|
|
37490
|
-
case
|
|
38277
|
+
case import_v1027.ComponentType.TextDisplay:
|
|
37491
38278
|
return new TextDisplayBuilder(data);
|
|
37492
|
-
case
|
|
38279
|
+
case import_v1027.ComponentType.Thumbnail:
|
|
37493
38280
|
return new ThumbnailBuilder(data);
|
|
37494
|
-
case
|
|
38281
|
+
case import_v1027.ComponentType.MediaGallery:
|
|
37495
38282
|
return new MediaGalleryBuilder(data);
|
|
37496
|
-
case
|
|
38283
|
+
case import_v1027.ComponentType.Label:
|
|
37497
38284
|
return new LabelBuilder(data);
|
|
37498
|
-
case
|
|
38285
|
+
case import_v1027.ComponentType.FileUpload:
|
|
37499
38286
|
return new FileUploadBuilder(data);
|
|
38287
|
+
case import_v1027.ComponentType.Checkbox:
|
|
38288
|
+
return new CheckboxBuilder(data);
|
|
38289
|
+
case import_v1027.ComponentType.CheckboxGroup:
|
|
38290
|
+
return new CheckboxGroupBuilder(data);
|
|
38291
|
+
case import_v1027.ComponentType.RadioGroup:
|
|
38292
|
+
return new RadioGroupBuilder(data);
|
|
37500
38293
|
default:
|
|
37501
38294
|
throw new Error(`Cannot properly serialize component type: ${data.type}`);
|
|
37502
38295
|
}
|
|
@@ -37522,7 +38315,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37522
38315
|
}
|
|
37523
38316
|
components;
|
|
37524
38317
|
constructor({ components, ...data } = {}) {
|
|
37525
|
-
super({ type:
|
|
38318
|
+
super({ type: import_v1028.ComponentType.ActionRow, ...data });
|
|
37526
38319
|
this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
|
|
37527
38320
|
}
|
|
37528
38321
|
addComponents(...components) {
|
|
@@ -37540,16 +38333,16 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37540
38333
|
};
|
|
37541
38334
|
}
|
|
37542
38335
|
};
|
|
37543
|
-
var
|
|
37544
|
-
var
|
|
37545
|
-
__export2(
|
|
38336
|
+
var import_v1029 = require_v106();
|
|
38337
|
+
var Assertions_exports9 = {};
|
|
38338
|
+
__export2(Assertions_exports9, {
|
|
37546
38339
|
componentsValidator: () => componentsValidator,
|
|
37547
38340
|
titleValidator: () => titleValidator,
|
|
37548
38341
|
validateRequiredParameters: () => validateRequiredParameters2
|
|
37549
38342
|
});
|
|
37550
|
-
var
|
|
37551
|
-
var titleValidator =
|
|
37552
|
-
var componentsValidator =
|
|
38343
|
+
var import_shapeshift9 = require_cjs4();
|
|
38344
|
+
var titleValidator = import_shapeshift9.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
|
|
38345
|
+
var componentsValidator = import_shapeshift9.s.union([import_shapeshift9.s.instance(ActionRowBuilder), import_shapeshift9.s.instance(LabelBuilder), import_shapeshift9.s.instance(TextDisplayBuilder)]).array().lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);
|
|
37553
38346
|
function validateRequiredParameters2(customId, title, components) {
|
|
37554
38347
|
customIdValidator.parse(customId);
|
|
37555
38348
|
titleValidator.parse(title);
|
|
@@ -37583,16 +38376,16 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37583
38376
|
return new ActionRowBuilder().addComponents(component);
|
|
37584
38377
|
}
|
|
37585
38378
|
if ("type" in component) {
|
|
37586
|
-
if (component.type ===
|
|
38379
|
+
if (component.type === import_v1029.ComponentType.ActionRow) {
|
|
37587
38380
|
return new ActionRowBuilder(component);
|
|
37588
38381
|
}
|
|
37589
|
-
if (component.type ===
|
|
38382
|
+
if (component.type === import_v1029.ComponentType.Label) {
|
|
37590
38383
|
return new LabelBuilder(component);
|
|
37591
38384
|
}
|
|
37592
|
-
if (component.type ===
|
|
38385
|
+
if (component.type === import_v1029.ComponentType.TextDisplay) {
|
|
37593
38386
|
return new TextDisplayBuilder(component);
|
|
37594
38387
|
}
|
|
37595
|
-
if (component.type ===
|
|
38388
|
+
if (component.type === import_v1029.ComponentType.TextInput) {
|
|
37596
38389
|
return new ActionRowBuilder().addComponents(new TextInputBuilder(component));
|
|
37597
38390
|
}
|
|
37598
38391
|
}
|
|
@@ -37640,8 +38433,8 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37640
38433
|
};
|
|
37641
38434
|
}
|
|
37642
38435
|
};
|
|
37643
|
-
var
|
|
37644
|
-
__export2(
|
|
38436
|
+
var Assertions_exports10 = {};
|
|
38437
|
+
__export2(Assertions_exports10, {
|
|
37645
38438
|
assertReturnOfBuilder: () => assertReturnOfBuilder2,
|
|
37646
38439
|
contextsPredicate: () => contextsPredicate,
|
|
37647
38440
|
integrationTypesPredicate: () => integrationTypesPredicate,
|
|
@@ -37659,20 +38452,20 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37659
38452
|
validateRequired: () => validateRequired,
|
|
37660
38453
|
validateRequiredParameters: () => validateRequiredParameters3
|
|
37661
38454
|
});
|
|
37662
|
-
var
|
|
37663
|
-
var
|
|
37664
|
-
var namePredicate =
|
|
38455
|
+
var import_shapeshift10 = require_cjs4();
|
|
38456
|
+
var import_v1030 = require_v106();
|
|
38457
|
+
var namePredicate = import_shapeshift10.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);
|
|
37665
38458
|
function validateName(name) {
|
|
37666
38459
|
namePredicate.parse(name);
|
|
37667
38460
|
}
|
|
37668
38461
|
__name(validateName, "validateName");
|
|
37669
|
-
var descriptionPredicate3 =
|
|
37670
|
-
var localePredicate =
|
|
38462
|
+
var descriptionPredicate3 = import_shapeshift10.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
|
|
38463
|
+
var localePredicate = import_shapeshift10.s.nativeEnum(import_v1030.Locale);
|
|
37671
38464
|
function validateDescription(description) {
|
|
37672
38465
|
descriptionPredicate3.parse(description);
|
|
37673
38466
|
}
|
|
37674
38467
|
__name(validateDescription, "validateDescription");
|
|
37675
|
-
var maxArrayLengthPredicate =
|
|
38468
|
+
var maxArrayLengthPredicate = import_shapeshift10.s.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
|
|
37676
38469
|
function validateLocale(locale) {
|
|
37677
38470
|
return localePredicate.parse(locale);
|
|
37678
38471
|
}
|
|
@@ -37687,7 +38480,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37687
38480
|
validateMaxOptionsLength(options);
|
|
37688
38481
|
}
|
|
37689
38482
|
__name(validateRequiredParameters3, "validateRequiredParameters");
|
|
37690
|
-
var booleanPredicate =
|
|
38483
|
+
var booleanPredicate = import_shapeshift10.s.boolean();
|
|
37691
38484
|
function validateDefaultPermission(value) {
|
|
37692
38485
|
booleanPredicate.parse(value);
|
|
37693
38486
|
}
|
|
@@ -37696,29 +38489,29 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37696
38489
|
booleanPredicate.parse(required);
|
|
37697
38490
|
}
|
|
37698
38491
|
__name(validateRequired, "validateRequired");
|
|
37699
|
-
var choicesLengthPredicate =
|
|
38492
|
+
var choicesLengthPredicate = import_shapeshift10.s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
|
|
37700
38493
|
function validateChoicesLength(amountAdding, choices) {
|
|
37701
38494
|
choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
|
|
37702
38495
|
}
|
|
37703
38496
|
__name(validateChoicesLength, "validateChoicesLength");
|
|
37704
38497
|
function assertReturnOfBuilder2(input, ExpectedInstanceOf) {
|
|
37705
|
-
|
|
38498
|
+
import_shapeshift10.s.instance(ExpectedInstanceOf).parse(input);
|
|
37706
38499
|
}
|
|
37707
38500
|
__name(assertReturnOfBuilder2, "assertReturnOfBuilder");
|
|
37708
|
-
var localizationMapPredicate =
|
|
38501
|
+
var localizationMapPredicate = import_shapeshift10.s.object(Object.fromEntries(Object.values(import_v1030.Locale).map((locale) => [locale, import_shapeshift10.s.string().nullish()]))).strict().nullish().setValidationEnabled(isValidationEnabled);
|
|
37709
38502
|
function validateLocalizationMap(value) {
|
|
37710
38503
|
localizationMapPredicate.parse(value);
|
|
37711
38504
|
}
|
|
37712
38505
|
__name(validateLocalizationMap, "validateLocalizationMap");
|
|
37713
|
-
var dmPermissionPredicate =
|
|
38506
|
+
var dmPermissionPredicate = import_shapeshift10.s.boolean().nullish();
|
|
37714
38507
|
function validateDMPermission(value) {
|
|
37715
38508
|
dmPermissionPredicate.parse(value);
|
|
37716
38509
|
}
|
|
37717
38510
|
__name(validateDMPermission, "validateDMPermission");
|
|
37718
|
-
var memberPermissionPredicate =
|
|
37719
|
-
|
|
37720
|
-
|
|
37721
|
-
|
|
38511
|
+
var memberPermissionPredicate = import_shapeshift10.s.union([
|
|
38512
|
+
import_shapeshift10.s.bigint().transform((value) => value.toString()),
|
|
38513
|
+
import_shapeshift10.s.number().safeInt().transform((value) => value.toString()),
|
|
38514
|
+
import_shapeshift10.s.string().regex(/^\d+$/)
|
|
37722
38515
|
]).nullish();
|
|
37723
38516
|
function validateDefaultMemberPermissions(permissions) {
|
|
37724
38517
|
return memberPermissionPredicate.parse(permissions);
|
|
@@ -37728,9 +38521,9 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37728
38521
|
booleanPredicate.parse(value);
|
|
37729
38522
|
}
|
|
37730
38523
|
__name(validateNSFW, "validateNSFW");
|
|
37731
|
-
var contextsPredicate =
|
|
37732
|
-
var integrationTypesPredicate =
|
|
37733
|
-
var import_ts_mixer6 =
|
|
38524
|
+
var contextsPredicate = import_shapeshift10.s.array(import_shapeshift10.s.nativeEnum(import_v1030.InteractionContextType).setValidationEnabled(isValidationEnabled));
|
|
38525
|
+
var integrationTypesPredicate = import_shapeshift10.s.array(import_shapeshift10.s.nativeEnum(import_v1030.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled));
|
|
38526
|
+
var import_ts_mixer6 = require_cjs5();
|
|
37734
38527
|
var SharedNameAndDescription = class {
|
|
37735
38528
|
static {
|
|
37736
38529
|
__name(this, "SharedNameAndDescription");
|
|
@@ -37798,7 +38591,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37798
38591
|
return this;
|
|
37799
38592
|
}
|
|
37800
38593
|
};
|
|
37801
|
-
var
|
|
38594
|
+
var import_v1031 = require_v106();
|
|
37802
38595
|
var SharedSlashCommand = class {
|
|
37803
38596
|
static {
|
|
37804
38597
|
__name(this, "SharedSlashCommand");
|
|
@@ -37848,12 +38641,12 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37848
38641
|
validateLocalizationMap(this.description_localizations);
|
|
37849
38642
|
return {
|
|
37850
38643
|
...this,
|
|
37851
|
-
type:
|
|
38644
|
+
type: import_v1031.ApplicationCommandType.ChatInput,
|
|
37852
38645
|
options: this.options.map((option) => option.toJSON())
|
|
37853
38646
|
};
|
|
37854
38647
|
}
|
|
37855
38648
|
};
|
|
37856
|
-
var
|
|
38649
|
+
var import_v1032 = require_v106();
|
|
37857
38650
|
var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
|
|
37858
38651
|
static {
|
|
37859
38652
|
__name(this, "ApplicationCommandOptionBase");
|
|
@@ -37875,40 +38668,40 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37875
38668
|
static {
|
|
37876
38669
|
__name(this, "SlashCommandAttachmentOption");
|
|
37877
38670
|
}
|
|
37878
|
-
type =
|
|
38671
|
+
type = import_v1032.ApplicationCommandOptionType.Attachment;
|
|
37879
38672
|
toJSON() {
|
|
37880
38673
|
this.runRequiredValidations();
|
|
37881
38674
|
return { ...this };
|
|
37882
38675
|
}
|
|
37883
38676
|
};
|
|
37884
|
-
var
|
|
38677
|
+
var import_v1033 = require_v106();
|
|
37885
38678
|
var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
|
|
37886
38679
|
static {
|
|
37887
38680
|
__name(this, "SlashCommandBooleanOption");
|
|
37888
38681
|
}
|
|
37889
|
-
type =
|
|
38682
|
+
type = import_v1033.ApplicationCommandOptionType.Boolean;
|
|
37890
38683
|
toJSON() {
|
|
37891
38684
|
this.runRequiredValidations();
|
|
37892
38685
|
return { ...this };
|
|
37893
38686
|
}
|
|
37894
38687
|
};
|
|
37895
|
-
var
|
|
37896
|
-
var import_ts_mixer =
|
|
37897
|
-
var
|
|
37898
|
-
var
|
|
38688
|
+
var import_v1035 = require_v106();
|
|
38689
|
+
var import_ts_mixer = require_cjs5();
|
|
38690
|
+
var import_shapeshift11 = require_cjs4();
|
|
38691
|
+
var import_v1034 = require_v106();
|
|
37899
38692
|
var allowedChannelTypes = [
|
|
37900
|
-
|
|
37901
|
-
|
|
37902
|
-
|
|
37903
|
-
|
|
37904
|
-
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
|
|
37909
|
-
|
|
38693
|
+
import_v1034.ChannelType.GuildText,
|
|
38694
|
+
import_v1034.ChannelType.GuildVoice,
|
|
38695
|
+
import_v1034.ChannelType.GuildCategory,
|
|
38696
|
+
import_v1034.ChannelType.GuildAnnouncement,
|
|
38697
|
+
import_v1034.ChannelType.AnnouncementThread,
|
|
38698
|
+
import_v1034.ChannelType.PublicThread,
|
|
38699
|
+
import_v1034.ChannelType.PrivateThread,
|
|
38700
|
+
import_v1034.ChannelType.GuildStageVoice,
|
|
38701
|
+
import_v1034.ChannelType.GuildForum,
|
|
38702
|
+
import_v1034.ChannelType.GuildMedia
|
|
37910
38703
|
];
|
|
37911
|
-
var channelTypesPredicate =
|
|
38704
|
+
var channelTypesPredicate = import_shapeshift11.s.array(import_shapeshift11.s.union(allowedChannelTypes.map((type) => import_shapeshift11.s.literal(type))));
|
|
37912
38705
|
var ApplicationCommandOptionChannelTypesMixin = class {
|
|
37913
38706
|
static {
|
|
37914
38707
|
__name(this, "ApplicationCommandOptionChannelTypesMixin");
|
|
@@ -37923,7 +38716,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37923
38716
|
}
|
|
37924
38717
|
};
|
|
37925
38718
|
var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
|
|
37926
|
-
type =
|
|
38719
|
+
type = import_v1035.ApplicationCommandOptionType.Channel;
|
|
37927
38720
|
toJSON() {
|
|
37928
38721
|
this.runRequiredValidations();
|
|
37929
38722
|
return { ...this };
|
|
@@ -37933,9 +38726,9 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37933
38726
|
SlashCommandChannelOption = __decorateClass([
|
|
37934
38727
|
(0, import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin)
|
|
37935
38728
|
], SlashCommandChannelOption);
|
|
37936
|
-
var
|
|
37937
|
-
var
|
|
37938
|
-
var import_ts_mixer2 =
|
|
38729
|
+
var import_shapeshift14 = require_cjs4();
|
|
38730
|
+
var import_v1037 = require_v106();
|
|
38731
|
+
var import_ts_mixer2 = require_cjs5();
|
|
37939
38732
|
var ApplicationCommandNumericOptionMinMaxValueMixin = class {
|
|
37940
38733
|
static {
|
|
37941
38734
|
__name(this, "ApplicationCommandNumericOptionMinMaxValueMixin");
|
|
@@ -37943,8 +38736,8 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37943
38736
|
max_value;
|
|
37944
38737
|
min_value;
|
|
37945
38738
|
};
|
|
37946
|
-
var
|
|
37947
|
-
var booleanPredicate2 =
|
|
38739
|
+
var import_shapeshift12 = require_cjs4();
|
|
38740
|
+
var booleanPredicate2 = import_shapeshift12.s.boolean();
|
|
37948
38741
|
var ApplicationCommandOptionWithAutocompleteMixin = class {
|
|
37949
38742
|
static {
|
|
37950
38743
|
__name(this, "ApplicationCommandOptionWithAutocompleteMixin");
|
|
@@ -37960,14 +38753,14 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37960
38753
|
return this;
|
|
37961
38754
|
}
|
|
37962
38755
|
};
|
|
37963
|
-
var
|
|
37964
|
-
var
|
|
37965
|
-
var stringPredicate =
|
|
37966
|
-
var numberPredicate =
|
|
37967
|
-
var choicesPredicate =
|
|
38756
|
+
var import_shapeshift13 = require_cjs4();
|
|
38757
|
+
var import_v1036 = require_v106();
|
|
38758
|
+
var stringPredicate = import_shapeshift13.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
|
|
38759
|
+
var numberPredicate = import_shapeshift13.s.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
|
|
38760
|
+
var choicesPredicate = import_shapeshift13.s.object({
|
|
37968
38761
|
name: stringPredicate,
|
|
37969
38762
|
name_localizations: localizationMapPredicate,
|
|
37970
|
-
value:
|
|
38763
|
+
value: import_shapeshift13.s.union([stringPredicate, numberPredicate])
|
|
37971
38764
|
}).array();
|
|
37972
38765
|
var ApplicationCommandOptionWithChoicesMixin = class {
|
|
37973
38766
|
static {
|
|
@@ -37986,7 +38779,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
37986
38779
|
}
|
|
37987
38780
|
validateChoicesLength(normalizedChoices.length, this.choices);
|
|
37988
38781
|
for (const { name, name_localizations, value } of normalizedChoices) {
|
|
37989
|
-
if (this.type ===
|
|
38782
|
+
if (this.type === import_v1036.ApplicationCommandOptionType.String) {
|
|
37990
38783
|
stringPredicate.parse(value);
|
|
37991
38784
|
} else {
|
|
37992
38785
|
numberPredicate.parse(value);
|
|
@@ -38006,9 +38799,9 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38006
38799
|
return this;
|
|
38007
38800
|
}
|
|
38008
38801
|
};
|
|
38009
|
-
var numberValidator =
|
|
38802
|
+
var numberValidator = import_shapeshift14.s.number().int();
|
|
38010
38803
|
var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
|
|
38011
|
-
type =
|
|
38804
|
+
type = import_v1037.ApplicationCommandOptionType.Integer;
|
|
38012
38805
|
setMaxValue(max) {
|
|
38013
38806
|
numberValidator.parse(max);
|
|
38014
38807
|
Reflect.set(this, "max_value", max);
|
|
@@ -38031,23 +38824,23 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38031
38824
|
SlashCommandIntegerOption = __decorateClass([
|
|
38032
38825
|
(0, import_ts_mixer2.mix)(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)
|
|
38033
38826
|
], SlashCommandIntegerOption);
|
|
38034
|
-
var
|
|
38827
|
+
var import_v1038 = require_v106();
|
|
38035
38828
|
var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
|
|
38036
38829
|
static {
|
|
38037
38830
|
__name(this, "SlashCommandMentionableOption");
|
|
38038
38831
|
}
|
|
38039
|
-
type =
|
|
38832
|
+
type = import_v1038.ApplicationCommandOptionType.Mentionable;
|
|
38040
38833
|
toJSON() {
|
|
38041
38834
|
this.runRequiredValidations();
|
|
38042
38835
|
return { ...this };
|
|
38043
38836
|
}
|
|
38044
38837
|
};
|
|
38045
|
-
var
|
|
38046
|
-
var
|
|
38047
|
-
var import_ts_mixer3 =
|
|
38048
|
-
var numberValidator2 =
|
|
38838
|
+
var import_shapeshift15 = require_cjs4();
|
|
38839
|
+
var import_v1039 = require_v106();
|
|
38840
|
+
var import_ts_mixer3 = require_cjs5();
|
|
38841
|
+
var numberValidator2 = import_shapeshift15.s.number();
|
|
38049
38842
|
var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
|
|
38050
|
-
type =
|
|
38843
|
+
type = import_v1039.ApplicationCommandOptionType.Number;
|
|
38051
38844
|
setMaxValue(max) {
|
|
38052
38845
|
numberValidator2.parse(max);
|
|
38053
38846
|
Reflect.set(this, "max_value", max);
|
|
@@ -38070,24 +38863,24 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38070
38863
|
SlashCommandNumberOption = __decorateClass([
|
|
38071
38864
|
(0, import_ts_mixer3.mix)(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)
|
|
38072
38865
|
], SlashCommandNumberOption);
|
|
38073
|
-
var
|
|
38866
|
+
var import_v1040 = require_v106();
|
|
38074
38867
|
var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
|
|
38075
38868
|
static {
|
|
38076
38869
|
__name(this, "SlashCommandRoleOption");
|
|
38077
38870
|
}
|
|
38078
|
-
type =
|
|
38871
|
+
type = import_v1040.ApplicationCommandOptionType.Role;
|
|
38079
38872
|
toJSON() {
|
|
38080
38873
|
this.runRequiredValidations();
|
|
38081
38874
|
return { ...this };
|
|
38082
38875
|
}
|
|
38083
38876
|
};
|
|
38084
|
-
var
|
|
38085
|
-
var
|
|
38086
|
-
var import_ts_mixer4 =
|
|
38087
|
-
var minLengthValidator2 =
|
|
38088
|
-
var maxLengthValidator2 =
|
|
38877
|
+
var import_shapeshift16 = require_cjs4();
|
|
38878
|
+
var import_v1041 = require_v106();
|
|
38879
|
+
var import_ts_mixer4 = require_cjs5();
|
|
38880
|
+
var minLengthValidator2 = import_shapeshift16.s.number().greaterThanOrEqual(0).lessThanOrEqual(6000);
|
|
38881
|
+
var maxLengthValidator2 = import_shapeshift16.s.number().greaterThanOrEqual(1).lessThanOrEqual(6000);
|
|
38089
38882
|
var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
|
|
38090
|
-
type =
|
|
38883
|
+
type = import_v1041.ApplicationCommandOptionType.String;
|
|
38091
38884
|
max_length;
|
|
38092
38885
|
min_length;
|
|
38093
38886
|
setMaxLength(max) {
|
|
@@ -38112,12 +38905,12 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38112
38905
|
SlashCommandStringOption = __decorateClass([
|
|
38113
38906
|
(0, import_ts_mixer4.mix)(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)
|
|
38114
38907
|
], SlashCommandStringOption);
|
|
38115
|
-
var
|
|
38908
|
+
var import_v1042 = require_v106();
|
|
38116
38909
|
var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
|
|
38117
38910
|
static {
|
|
38118
38911
|
__name(this, "SlashCommandUserOption");
|
|
38119
38912
|
}
|
|
38120
|
-
type =
|
|
38913
|
+
type = import_v1042.ApplicationCommandOptionType.User;
|
|
38121
38914
|
toJSON() {
|
|
38122
38915
|
this.runRequiredValidations();
|
|
38123
38916
|
return { ...this };
|
|
@@ -38164,8 +38957,8 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38164
38957
|
return this;
|
|
38165
38958
|
}
|
|
38166
38959
|
};
|
|
38167
|
-
var
|
|
38168
|
-
var import_ts_mixer5 =
|
|
38960
|
+
var import_v1043 = require_v106();
|
|
38961
|
+
var import_ts_mixer5 = require_cjs5();
|
|
38169
38962
|
var SlashCommandSubcommandGroupBuilder = class {
|
|
38170
38963
|
name = undefined;
|
|
38171
38964
|
description = undefined;
|
|
@@ -38181,7 +38974,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38181
38974
|
toJSON() {
|
|
38182
38975
|
validateRequiredParameters3(this.name, this.description, this.options);
|
|
38183
38976
|
return {
|
|
38184
|
-
type:
|
|
38977
|
+
type: import_v1043.ApplicationCommandOptionType.SubcommandGroup,
|
|
38185
38978
|
name: this.name,
|
|
38186
38979
|
name_localizations: this.name_localizations,
|
|
38187
38980
|
description: this.description,
|
|
@@ -38201,7 +38994,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38201
38994
|
toJSON() {
|
|
38202
38995
|
validateRequiredParameters3(this.name, this.description, this.options);
|
|
38203
38996
|
return {
|
|
38204
|
-
type:
|
|
38997
|
+
type: import_v1043.ApplicationCommandOptionType.Subcommand,
|
|
38205
38998
|
name: this.name,
|
|
38206
38999
|
name_localizations: this.name_localizations,
|
|
38207
39000
|
description: this.description,
|
|
@@ -38253,8 +39046,8 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38253
39046
|
SlashCommandBuilder = __decorateClass([
|
|
38254
39047
|
(0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)
|
|
38255
39048
|
], SlashCommandBuilder);
|
|
38256
|
-
var
|
|
38257
|
-
__export2(
|
|
39049
|
+
var Assertions_exports11 = {};
|
|
39050
|
+
__export2(Assertions_exports11, {
|
|
38258
39051
|
contextsPredicate: () => contextsPredicate2,
|
|
38259
39052
|
integrationTypesPredicate: () => integrationTypesPredicate2,
|
|
38260
39053
|
validateDMPermission: () => validateDMPermission2,
|
|
@@ -38264,11 +39057,11 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38264
39057
|
validateRequiredParameters: () => validateRequiredParameters4,
|
|
38265
39058
|
validateType: () => validateType
|
|
38266
39059
|
});
|
|
38267
|
-
var
|
|
38268
|
-
var
|
|
38269
|
-
var namePredicate2 =
|
|
38270
|
-
var typePredicate =
|
|
38271
|
-
var booleanPredicate3 =
|
|
39060
|
+
var import_shapeshift17 = require_cjs4();
|
|
39061
|
+
var import_v1044 = require_v106();
|
|
39062
|
+
var namePredicate2 = import_shapeshift17.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/\S/).setValidationEnabled(isValidationEnabled);
|
|
39063
|
+
var typePredicate = import_shapeshift17.s.union([import_shapeshift17.s.literal(import_v1044.ApplicationCommandType.User), import_shapeshift17.s.literal(import_v1044.ApplicationCommandType.Message)]).setValidationEnabled(isValidationEnabled);
|
|
39064
|
+
var booleanPredicate3 = import_shapeshift17.s.boolean();
|
|
38272
39065
|
function validateDefaultPermission2(value) {
|
|
38273
39066
|
booleanPredicate3.parse(value);
|
|
38274
39067
|
}
|
|
@@ -38286,22 +39079,22 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38286
39079
|
validateType(type);
|
|
38287
39080
|
}
|
|
38288
39081
|
__name(validateRequiredParameters4, "validateRequiredParameters");
|
|
38289
|
-
var dmPermissionPredicate2 =
|
|
39082
|
+
var dmPermissionPredicate2 = import_shapeshift17.s.boolean().nullish();
|
|
38290
39083
|
function validateDMPermission2(value) {
|
|
38291
39084
|
dmPermissionPredicate2.parse(value);
|
|
38292
39085
|
}
|
|
38293
39086
|
__name(validateDMPermission2, "validateDMPermission");
|
|
38294
|
-
var memberPermissionPredicate2 =
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
39087
|
+
var memberPermissionPredicate2 = import_shapeshift17.s.union([
|
|
39088
|
+
import_shapeshift17.s.bigint().transform((value) => value.toString()),
|
|
39089
|
+
import_shapeshift17.s.number().safeInt().transform((value) => value.toString()),
|
|
39090
|
+
import_shapeshift17.s.string().regex(/^\d+$/)
|
|
38298
39091
|
]).nullish();
|
|
38299
39092
|
function validateDefaultMemberPermissions2(permissions) {
|
|
38300
39093
|
return memberPermissionPredicate2.parse(permissions);
|
|
38301
39094
|
}
|
|
38302
39095
|
__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
|
|
38303
|
-
var contextsPredicate2 =
|
|
38304
|
-
var integrationTypesPredicate2 =
|
|
39096
|
+
var contextsPredicate2 = import_shapeshift17.s.array(import_shapeshift17.s.nativeEnum(import_v1044.InteractionContextType).setValidationEnabled(isValidationEnabled));
|
|
39097
|
+
var integrationTypesPredicate2 = import_shapeshift17.s.array(import_shapeshift17.s.nativeEnum(import_v1044.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled));
|
|
38305
39098
|
var ContextMenuCommandBuilder = class {
|
|
38306
39099
|
static {
|
|
38307
39100
|
__name(this, "ContextMenuCommandBuilder");
|
|
@@ -38380,7 +39173,7 @@ var require_dist8 = __commonJS((exports, module) => {
|
|
|
38380
39173
|
return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
|
|
38381
39174
|
}
|
|
38382
39175
|
__name(embedLength, "embedLength");
|
|
38383
|
-
var version = "1.
|
|
39176
|
+
var version = "1.14.1";
|
|
38384
39177
|
});
|
|
38385
39178
|
|
|
38386
39179
|
// node_modules/discord.js/src/structures/Embed.js
|
|
@@ -38737,7 +39530,7 @@ var require_ReactionCollector = __commonJS((exports, module) => {
|
|
|
38737
39530
|
|
|
38738
39531
|
// node_modules/discord.js/src/structures/Sticker.js
|
|
38739
39532
|
var require_Sticker = __commonJS((exports) => {
|
|
38740
|
-
var { DiscordSnowflake } =
|
|
39533
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
38741
39534
|
var { Routes } = require_v106();
|
|
38742
39535
|
var Base = require_Base();
|
|
38743
39536
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -39826,7 +40619,7 @@ var require_Components = __commonJS((exports, module) => {
|
|
|
39826
40619
|
var require_Message = __commonJS((exports) => {
|
|
39827
40620
|
var { Collection } = require_dist6();
|
|
39828
40621
|
var { messageLink } = require_dist7();
|
|
39829
|
-
var { DiscordSnowflake } =
|
|
40622
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
39830
40623
|
var {
|
|
39831
40624
|
InteractionType,
|
|
39832
40625
|
ChannelType,
|
|
@@ -40167,7 +40960,7 @@ var require_Message = __commonJS((exports) => {
|
|
|
40167
40960
|
const permissions = channel?.permissionsFor(this.client.user);
|
|
40168
40961
|
if (!permissions)
|
|
40169
40962
|
return false;
|
|
40170
|
-
return permissions.has(PermissionFlagsBits.ReadMessageHistory | PermissionFlagsBits.PinMessages)
|
|
40963
|
+
return permissions.has(PermissionFlagsBits.ReadMessageHistory | PermissionFlagsBits.PinMessages);
|
|
40171
40964
|
}
|
|
40172
40965
|
async fetchReference() {
|
|
40173
40966
|
if (!this.reference)
|
|
@@ -40327,7 +41120,7 @@ var require_Message = __commonJS((exports) => {
|
|
|
40327
41120
|
var require_Webhook = __commonJS((exports, module) => {
|
|
40328
41121
|
var { makeURLSearchParams } = require_dist5();
|
|
40329
41122
|
var { lazy } = require_dist();
|
|
40330
|
-
var { DiscordSnowflake } =
|
|
41123
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
40331
41124
|
var { Routes, WebhookType } = require_v106();
|
|
40332
41125
|
var MessagePayload = require_MessagePayload();
|
|
40333
41126
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -41217,7 +42010,7 @@ var require_InteractionWebhook = __commonJS((exports, module) => {
|
|
|
41217
42010
|
var require_MessagePayload = __commonJS((exports, module) => {
|
|
41218
42011
|
var { Buffer: Buffer2 } = __require("node:buffer");
|
|
41219
42012
|
var { lazy, isJSONEncodable } = require_dist();
|
|
41220
|
-
var { DiscordSnowflake } =
|
|
42013
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
41221
42014
|
var { MessageFlags, MessageReferenceType } = require_v106();
|
|
41222
42015
|
var { DiscordjsError, DiscordjsRangeError, ErrorCodes } = require_errors2();
|
|
41223
42016
|
var { resolveFile } = require_DataResolver();
|
|
@@ -41431,7 +42224,7 @@ var require_GuildMessageManager = __commonJS((exports, module) => {
|
|
|
41431
42224
|
// node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js
|
|
41432
42225
|
var require_TextBasedChannel = __commonJS((exports, module) => {
|
|
41433
42226
|
var { Collection } = require_dist6();
|
|
41434
|
-
var { DiscordSnowflake } =
|
|
42227
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
41435
42228
|
var { InteractionType, Routes } = require_v106();
|
|
41436
42229
|
var { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require_errors2();
|
|
41437
42230
|
var { MaxBulkDeletableMessageAge } = require_Constants();
|
|
@@ -41575,7 +42368,7 @@ var require_UserFlagsBitField = __commonJS((exports, module) => {
|
|
|
41575
42368
|
var require_User = __commonJS((exports, module) => {
|
|
41576
42369
|
var { userMention } = require_dist7();
|
|
41577
42370
|
var { calculateUserDefaultAvatarIndex } = require_dist5();
|
|
41578
|
-
var { DiscordSnowflake } =
|
|
42371
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
41579
42372
|
var Base = require_Base();
|
|
41580
42373
|
var TextBasedChannel = require_TextBasedChannel();
|
|
41581
42374
|
var { _transformCollectibles } = require_Transformers();
|
|
@@ -41950,6 +42743,7 @@ var require_Partials = __commonJS((exports, module) => {
|
|
|
41950
42743
|
|
|
41951
42744
|
// node_modules/discord.js/src/client/actions/Action.js
|
|
41952
42745
|
var require_Action = __commonJS((exports, module) => {
|
|
42746
|
+
var { ChannelType } = require_v106();
|
|
41953
42747
|
var { Poll } = require_Poll();
|
|
41954
42748
|
var { PollAnswer } = require_PollAnswer();
|
|
41955
42749
|
var Partials = require_Partials();
|
|
@@ -41967,10 +42761,14 @@ var require_Action = __commonJS((exports, module) => {
|
|
|
41967
42761
|
getChannel(data) {
|
|
41968
42762
|
const payloadData = {};
|
|
41969
42763
|
const id = data.channel_id ?? data.id;
|
|
41970
|
-
if (
|
|
42764
|
+
if ("recipients" in data) {
|
|
42765
|
+
const recipient = data.author ?? data.user ?? { id: data.user_id };
|
|
42766
|
+
if (!data.recipients.some((existingRecipient) => recipient.id === existingRecipient.id)) {
|
|
42767
|
+
payloadData.recipients = [...data.recipients, recipient];
|
|
42768
|
+
}
|
|
42769
|
+
} else if (data.type === ChannelType.DM || data.type === ChannelType.GroupDM) {
|
|
41971
42770
|
const recipient = data.author ?? data.user ?? { id: data.user_id };
|
|
41972
|
-
|
|
41973
|
-
payloadData.recipients = [recipient];
|
|
42771
|
+
payloadData.recipients = [recipient];
|
|
41974
42772
|
}
|
|
41975
42773
|
if (id !== undefined)
|
|
41976
42774
|
payloadData.id = id;
|
|
@@ -42277,10 +43075,13 @@ var require_DMChannel = __commonJS((exports, module) => {
|
|
|
42277
43075
|
_patch(data) {
|
|
42278
43076
|
super._patch(data);
|
|
42279
43077
|
if (data.recipients) {
|
|
42280
|
-
|
|
42281
|
-
|
|
42282
|
-
|
|
42283
|
-
|
|
43078
|
+
this.recipientIds = [
|
|
43079
|
+
...new Set([...this.recipientIds ?? [], ...data.recipients.map((recipient) => recipient.id)])
|
|
43080
|
+
];
|
|
43081
|
+
for (const recipient of data.recipients) {
|
|
43082
|
+
if ("username" in recipient || this.client.options.partials.includes(Partials.User)) {
|
|
43083
|
+
this.client.users._add(recipient);
|
|
43084
|
+
}
|
|
42284
43085
|
}
|
|
42285
43086
|
}
|
|
42286
43087
|
if ("last_message_id" in data) {
|
|
@@ -42295,6 +43096,9 @@ var require_DMChannel = __commonJS((exports, module) => {
|
|
|
42295
43096
|
get partial() {
|
|
42296
43097
|
return this.lastMessageId === undefined;
|
|
42297
43098
|
}
|
|
43099
|
+
get recipientId() {
|
|
43100
|
+
return this.recipientIds.find((recipientId) => recipientId !== this.client.user.id) ?? this.recipientIds[0];
|
|
43101
|
+
}
|
|
42298
43102
|
get recipient() {
|
|
42299
43103
|
return this.client.users.resolve(this.recipientId);
|
|
42300
43104
|
}
|
|
@@ -43815,7 +44619,7 @@ var require_Integration = __commonJS((exports, module) => {
|
|
|
43815
44619
|
|
|
43816
44620
|
// node_modules/discord.js/src/structures/StageInstance.js
|
|
43817
44621
|
var require_StageInstance = __commonJS((exports) => {
|
|
43818
|
-
var { DiscordSnowflake } =
|
|
44622
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
43819
44623
|
var Base = require_Base();
|
|
43820
44624
|
|
|
43821
44625
|
class StageInstance extends Base {
|
|
@@ -43880,7 +44684,7 @@ var require_StageInstance = __commonJS((exports) => {
|
|
|
43880
44684
|
|
|
43881
44685
|
// node_modules/discord.js/src/structures/GuildAuditLogsEntry.js
|
|
43882
44686
|
var require_GuildAuditLogsEntry = __commonJS((exports, module) => {
|
|
43883
|
-
var { DiscordSnowflake } =
|
|
44687
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
43884
44688
|
var { AuditLogOptionsType, AuditLogEvent } = require_v106();
|
|
43885
44689
|
var AutoModerationRule = require_AutoModerationRule();
|
|
43886
44690
|
var { GuildOnboardingPrompt } = require_GuildOnboardingPrompt();
|
|
@@ -44988,7 +45792,7 @@ var require_AutocompleteInteraction = __commonJS((exports, module) => {
|
|
|
44988
45792
|
|
|
44989
45793
|
// node_modules/discord.js/src/structures/InteractionCallback.js
|
|
44990
45794
|
var require_InteractionCallback = __commonJS((exports, module) => {
|
|
44991
|
-
var { DiscordSnowflake } =
|
|
45795
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
44992
45796
|
|
|
44993
45797
|
class InteractionCallback {
|
|
44994
45798
|
constructor(client, data) {
|
|
@@ -45047,7 +45851,7 @@ var require_InteractionCallbackResponse = __commonJS((exports, module) => {
|
|
|
45047
45851
|
|
|
45048
45852
|
// node_modules/discord.js/src/structures/InteractionResponse.js
|
|
45049
45853
|
var require_InteractionResponse = __commonJS((exports, module) => {
|
|
45050
|
-
var { DiscordSnowflake } =
|
|
45854
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
45051
45855
|
var { InteractionType } = require_v106();
|
|
45052
45856
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
45053
45857
|
|
|
@@ -45657,6 +46461,15 @@ var require_ModalSubmitFields = __commonJS((exports, module) => {
|
|
|
45657
46461
|
getUploadedFiles(customId, required = false) {
|
|
45658
46462
|
return this._getTypedComponent(customId, [ComponentType.FileUpload], ["attachments"], required).attachments ?? null;
|
|
45659
46463
|
}
|
|
46464
|
+
getRadioGroup(customId, required = false) {
|
|
46465
|
+
return this._getTypedComponent(customId, [ComponentType.RadioGroup], ["value"], required).value;
|
|
46466
|
+
}
|
|
46467
|
+
getCheckboxGroup(customId) {
|
|
46468
|
+
return this._getTypedComponent(customId, [ComponentType.CheckboxGroup]).values;
|
|
46469
|
+
}
|
|
46470
|
+
getCheckbox(customId) {
|
|
46471
|
+
return this._getTypedComponent(customId, [ComponentType.Checkbox]).value;
|
|
46472
|
+
}
|
|
45660
46473
|
}
|
|
45661
46474
|
module.exports = ModalSubmitFields;
|
|
45662
46475
|
});
|
|
@@ -45889,7 +46702,7 @@ var require_InteractionCreate = __commonJS((exports, module) => {
|
|
|
45889
46702
|
class InteractionCreateAction extends Action {
|
|
45890
46703
|
handle(data) {
|
|
45891
46704
|
const client = this.client;
|
|
45892
|
-
const channel = data.channel && this.getChannel(data.channel);
|
|
46705
|
+
const channel = data.channel && this.getChannel({ ...data.channel, ..."recipients" in data.channel ? { user: data.user } : undefined });
|
|
45893
46706
|
let InteractionClass;
|
|
45894
46707
|
switch (data.type) {
|
|
45895
46708
|
case InteractionType.ApplicationCommand:
|
|
@@ -46012,7 +46825,8 @@ var require_MessageCreate = __commonJS((exports, module) => {
|
|
|
46012
46825
|
const channel = this.getChannel({
|
|
46013
46826
|
id: data.channel_id,
|
|
46014
46827
|
author: data.author,
|
|
46015
|
-
..."guild_id" in data && { guild_id: data.guild_id }
|
|
46828
|
+
..."guild_id" in data && { guild_id: data.guild_id },
|
|
46829
|
+
..."channel_type" in data && { type: data.channel_type }
|
|
46016
46830
|
});
|
|
46017
46831
|
if (channel) {
|
|
46018
46832
|
if (!channel.isTextBased())
|
|
@@ -47378,11 +48192,11 @@ var require_permessage_deflate2 = __commonJS((exports, module) => {
|
|
|
47378
48192
|
var zlibLimiter;
|
|
47379
48193
|
|
|
47380
48194
|
class PerMessageDeflate {
|
|
47381
|
-
constructor(options
|
|
47382
|
-
this._maxPayload = maxPayload | 0;
|
|
48195
|
+
constructor(options) {
|
|
47383
48196
|
this._options = options || {};
|
|
47384
48197
|
this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024;
|
|
47385
|
-
this.
|
|
48198
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
48199
|
+
this._isServer = !!this._options.isServer;
|
|
47386
48200
|
this._deflate = null;
|
|
47387
48201
|
this._inflate = null;
|
|
47388
48202
|
this.params = null;
|
|
@@ -47841,6 +48655,8 @@ var require_receiver2 = __commonJS((exports, module) => {
|
|
|
47841
48655
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
47842
48656
|
this._extensions = options.extensions || {};
|
|
47843
48657
|
this._isServer = !!options.isServer;
|
|
48658
|
+
this._maxBufferedChunks = options.maxBufferedChunks | 0;
|
|
48659
|
+
this._maxFragments = options.maxFragments | 0;
|
|
47844
48660
|
this._maxPayload = options.maxPayload | 0;
|
|
47845
48661
|
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
47846
48662
|
this[kWebSocket] = undefined;
|
|
@@ -47863,6 +48679,10 @@ var require_receiver2 = __commonJS((exports, module) => {
|
|
|
47863
48679
|
_write(chunk, encoding, cb) {
|
|
47864
48680
|
if (this._opcode === 8 && this._state == GET_INFO)
|
|
47865
48681
|
return cb();
|
|
48682
|
+
if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
|
|
48683
|
+
cb(this.createError(RangeError, "Too many buffered chunks", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
|
|
48684
|
+
return;
|
|
48685
|
+
}
|
|
47866
48686
|
this._bufferedBytes += chunk.length;
|
|
47867
48687
|
this._buffers.push(chunk);
|
|
47868
48688
|
this.startLoop(cb);
|
|
@@ -48066,6 +48886,11 @@ var require_receiver2 = __commonJS((exports, module) => {
|
|
|
48066
48886
|
return;
|
|
48067
48887
|
}
|
|
48068
48888
|
if (data.length) {
|
|
48889
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
48890
|
+
const error = this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS");
|
|
48891
|
+
cb(error);
|
|
48892
|
+
return;
|
|
48893
|
+
}
|
|
48069
48894
|
this._messageLength = this._totalPayloadLength;
|
|
48070
48895
|
this._fragments.push(data);
|
|
48071
48896
|
}
|
|
@@ -48083,6 +48908,11 @@ var require_receiver2 = __commonJS((exports, module) => {
|
|
|
48083
48908
|
cb(error);
|
|
48084
48909
|
return;
|
|
48085
48910
|
}
|
|
48911
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
48912
|
+
const error = this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS");
|
|
48913
|
+
cb(error);
|
|
48914
|
+
return;
|
|
48915
|
+
}
|
|
48086
48916
|
this._fragments.push(buf);
|
|
48087
48917
|
}
|
|
48088
48918
|
this.dataMessage(cb);
|
|
@@ -48198,6 +49028,9 @@ var require_receiver2 = __commonJS((exports, module) => {
|
|
|
48198
49028
|
var require_sender2 = __commonJS((exports, module) => {
|
|
48199
49029
|
var { Duplex } = __require("stream");
|
|
48200
49030
|
var { randomFillSync } = __require("crypto");
|
|
49031
|
+
var {
|
|
49032
|
+
types: { isUint8Array }
|
|
49033
|
+
} = __require("util");
|
|
48201
49034
|
var PerMessageDeflate = require_permessage_deflate2();
|
|
48202
49035
|
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants6();
|
|
48203
49036
|
var { isBlob, isValidStatusCode } = require_validation();
|
|
@@ -48317,8 +49150,10 @@ var require_sender2 = __commonJS((exports, module) => {
|
|
|
48317
49150
|
buf.writeUInt16BE(code, 0);
|
|
48318
49151
|
if (typeof data === "string") {
|
|
48319
49152
|
buf.write(data, 2);
|
|
48320
|
-
} else {
|
|
49153
|
+
} else if (isUint8Array(data)) {
|
|
48321
49154
|
buf.set(data, 2);
|
|
49155
|
+
} else {
|
|
49156
|
+
throw new TypeError("Second argument must be a string or a Uint8Array");
|
|
48322
49157
|
}
|
|
48323
49158
|
}
|
|
48324
49159
|
const options = {
|
|
@@ -48985,6 +49820,8 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
48985
49820
|
binaryType: this.binaryType,
|
|
48986
49821
|
extensions: this._extensions,
|
|
48987
49822
|
isServer: this._isServer,
|
|
49823
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
49824
|
+
maxFragments: options.maxFragments,
|
|
48988
49825
|
maxPayload: options.maxPayload,
|
|
48989
49826
|
skipUTF8Validation: options.skipUTF8Validation
|
|
48990
49827
|
});
|
|
@@ -49227,6 +50064,8 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
49227
50064
|
autoPong: true,
|
|
49228
50065
|
closeTimeout: CLOSE_TIMEOUT,
|
|
49229
50066
|
protocolVersion: protocolVersions[1],
|
|
50067
|
+
maxBufferedChunks: 1024 * 1024,
|
|
50068
|
+
maxFragments: 128 * 1024,
|
|
49230
50069
|
maxPayload: 100 * 1024 * 1024,
|
|
49231
50070
|
skipUTF8Validation: false,
|
|
49232
50071
|
perMessageDeflate: true,
|
|
@@ -49253,7 +50092,7 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
49253
50092
|
} else {
|
|
49254
50093
|
try {
|
|
49255
50094
|
parsedUrl = new URL2(address);
|
|
49256
|
-
} catch
|
|
50095
|
+
} catch {
|
|
49257
50096
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
49258
50097
|
}
|
|
49259
50098
|
}
|
|
@@ -49301,7 +50140,11 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
49301
50140
|
opts.path = parsedUrl.pathname + parsedUrl.search;
|
|
49302
50141
|
opts.timeout = opts.handshakeTimeout;
|
|
49303
50142
|
if (opts.perMessageDeflate) {
|
|
49304
|
-
perMessageDeflate = new PerMessageDeflate(
|
|
50143
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
50144
|
+
...opts.perMessageDeflate,
|
|
50145
|
+
isServer: false,
|
|
50146
|
+
maxPayload: opts.maxPayload
|
|
50147
|
+
});
|
|
49305
50148
|
opts.headers["Sec-WebSocket-Extensions"] = format({
|
|
49306
50149
|
[PerMessageDeflate.extensionName]: perMessageDeflate.offer()
|
|
49307
50150
|
});
|
|
@@ -49461,6 +50304,8 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
49461
50304
|
websocket.setSocket(socket, head, {
|
|
49462
50305
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
49463
50306
|
generateMask: opts.generateMask,
|
|
50307
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
50308
|
+
maxFragments: opts.maxFragments,
|
|
49464
50309
|
maxPayload: opts.maxPayload,
|
|
49465
50310
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
49466
50311
|
});
|
|
@@ -49796,6 +50641,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
49796
50641
|
options = {
|
|
49797
50642
|
allowSynchronousEvents: true,
|
|
49798
50643
|
autoPong: true,
|
|
50644
|
+
maxBufferedChunks: 1024 * 1024,
|
|
50645
|
+
maxFragments: 128 * 1024,
|
|
49799
50646
|
maxPayload: 100 * 1024 * 1024,
|
|
49800
50647
|
skipUTF8Validation: false,
|
|
49801
50648
|
perMessageDeflate: false,
|
|
@@ -49947,7 +50794,11 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
49947
50794
|
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
|
|
49948
50795
|
const extensions = {};
|
|
49949
50796
|
if (this.options.perMessageDeflate && secWebSocketExtensions !== undefined) {
|
|
49950
|
-
const perMessageDeflate = new PerMessageDeflate(
|
|
50797
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
50798
|
+
...this.options.perMessageDeflate,
|
|
50799
|
+
isServer: true,
|
|
50800
|
+
maxPayload: this.options.maxPayload
|
|
50801
|
+
});
|
|
49951
50802
|
try {
|
|
49952
50803
|
const offers = extension.parse(secWebSocketExtensions);
|
|
49953
50804
|
if (offers[PerMessageDeflate.extensionName]) {
|
|
@@ -50018,6 +50869,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
50018
50869
|
socket.removeListener("error", socketOnError);
|
|
50019
50870
|
ws.setSocket(socket, head, {
|
|
50020
50871
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
50872
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
50873
|
+
maxFragments: this.options.maxFragments,
|
|
50021
50874
|
maxPayload: this.options.maxPayload,
|
|
50022
50875
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
50023
50876
|
});
|
|
@@ -50078,19 +50931,29 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
50078
50931
|
|
|
50079
50932
|
// node_modules/ws/index.js
|
|
50080
50933
|
var require_ws = __commonJS((exports, module) => {
|
|
50934
|
+
var createWebSocketStream = require_stream();
|
|
50935
|
+
var extension = require_extension();
|
|
50936
|
+
var PerMessageDeflate = require_permessage_deflate2();
|
|
50937
|
+
var Receiver = require_receiver2();
|
|
50938
|
+
var Sender = require_sender2();
|
|
50939
|
+
var subprotocol = require_subprotocol();
|
|
50081
50940
|
var WebSocket = require_websocket2();
|
|
50082
|
-
|
|
50083
|
-
WebSocket.
|
|
50084
|
-
WebSocket.
|
|
50085
|
-
WebSocket.
|
|
50941
|
+
var WebSocketServer = require_websocket_server();
|
|
50942
|
+
WebSocket.createWebSocketStream = createWebSocketStream;
|
|
50943
|
+
WebSocket.extension = extension;
|
|
50944
|
+
WebSocket.PerMessageDeflate = PerMessageDeflate;
|
|
50945
|
+
WebSocket.Receiver = Receiver;
|
|
50946
|
+
WebSocket.Sender = Sender;
|
|
50947
|
+
WebSocket.Server = WebSocketServer;
|
|
50948
|
+
WebSocket.subprotocol = subprotocol;
|
|
50086
50949
|
WebSocket.WebSocket = WebSocket;
|
|
50087
|
-
WebSocket.WebSocketServer =
|
|
50950
|
+
WebSocket.WebSocketServer = WebSocketServer;
|
|
50088
50951
|
module.exports = WebSocket;
|
|
50089
50952
|
});
|
|
50090
50953
|
|
|
50091
50954
|
// node_modules/@discordjs/ws/dist/index.js
|
|
50092
50955
|
var require_dist10 = __commonJS((exports, module) => {
|
|
50093
|
-
var __dirname = "/workspaces/
|
|
50956
|
+
var __dirname = "/workspaces/NexoCord/node_modules/@discordjs/ws/dist";
|
|
50094
50957
|
var __create2 = Object.create;
|
|
50095
50958
|
var __defProp2 = Object.defineProperty;
|
|
50096
50959
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -52967,7 +53830,7 @@ var require_GuildPreviewEmoji = __commonJS((exports, module) => {
|
|
|
52967
53830
|
// node_modules/discord.js/src/structures/GuildPreview.js
|
|
52968
53831
|
var require_GuildPreview = __commonJS((exports, module) => {
|
|
52969
53832
|
var { Collection } = require_dist6();
|
|
52970
|
-
var { DiscordSnowflake } =
|
|
53833
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
52971
53834
|
var { Routes } = require_v106();
|
|
52972
53835
|
var Base = require_Base();
|
|
52973
53836
|
var GuildPreviewEmoji = require_GuildPreviewEmoji();
|
|
@@ -53719,7 +54582,7 @@ var require_GuildMemberManager = __commonJS((exports, module) => {
|
|
|
53719
54582
|
var { Collection } = require_dist6();
|
|
53720
54583
|
var { makeURLSearchParams } = require_dist5();
|
|
53721
54584
|
var { GatewayRateLimitError } = require_dist();
|
|
53722
|
-
var { DiscordSnowflake } =
|
|
54585
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
53723
54586
|
var { Routes, GatewayOpcodes, GatewayDispatchEvents } = require_v106();
|
|
53724
54587
|
var CachedManager = require_CachedManager();
|
|
53725
54588
|
var { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require_errors2();
|
|
@@ -54144,7 +55007,7 @@ var require_GuildScheduledEventManager = __commonJS((exports, module) => {
|
|
|
54144
55007
|
|
|
54145
55008
|
// node_modules/discord.js/src/structures/SoundboardSound.js
|
|
54146
55009
|
var require_SoundboardSound = __commonJS((exports) => {
|
|
54147
|
-
var { DiscordSnowflake } =
|
|
55010
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
54148
55011
|
var Base = require_Base();
|
|
54149
55012
|
var { Emoji } = require_Emoji();
|
|
54150
55013
|
var { DiscordjsError, ErrorCodes } = require_errors2();
|
|
@@ -54891,7 +55754,7 @@ var require_SystemChannelFlagsBitField = __commonJS((exports, module) => {
|
|
|
54891
55754
|
var require_Guild = __commonJS((exports) => {
|
|
54892
55755
|
var { Collection } = require_dist6();
|
|
54893
55756
|
var { makeURLSearchParams } = require_dist5();
|
|
54894
|
-
var { DiscordSnowflake } =
|
|
55757
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
54895
55758
|
var { ChannelType, GuildPremiumTier, Routes, GuildFeature } = require_v106();
|
|
54896
55759
|
var AnonymousGuild = require_AnonymousGuild();
|
|
54897
55760
|
var GuildAuditLogs = require_GuildAuditLogs();
|
|
@@ -55718,7 +56581,8 @@ var require_UserManager = __commonJS((exports, module) => {
|
|
|
55718
56581
|
super(client, User, iterable);
|
|
55719
56582
|
}
|
|
55720
56583
|
dmChannel(userId) {
|
|
55721
|
-
|
|
56584
|
+
const expectedRecipientIds = [userId, this.client.user.id];
|
|
56585
|
+
return this.client.channels.cache.find((channel) => channel.type === ChannelType.DM && channel.recipientId === userId && channel.recipientIds.every((id) => expectedRecipientIds.includes(id))) ?? null;
|
|
55722
56586
|
}
|
|
55723
56587
|
async createDM(user, { cache = true, force = false } = {}) {
|
|
55724
56588
|
const id = this.resolveId(user);
|
|
@@ -55841,7 +56705,7 @@ var require_ClientPresence = __commonJS((exports, module) => {
|
|
|
55841
56705
|
// node_modules/discord.js/src/structures/StickerPack.js
|
|
55842
56706
|
var require_StickerPack = __commonJS((exports, module) => {
|
|
55843
56707
|
var { Collection } = require_dist6();
|
|
55844
|
-
var { DiscordSnowflake } =
|
|
56708
|
+
var { DiscordSnowflake } = require_cjs3();
|
|
55845
56709
|
var Base = require_Base();
|
|
55846
56710
|
var { Sticker } = require_Sticker();
|
|
55847
56711
|
|
|
@@ -57227,7 +58091,7 @@ var require_src = __commonJS((exports) => {
|
|
|
57227
58091
|
exports.ShardEvents = require_ShardEvents();
|
|
57228
58092
|
exports.SKUFlagsBitField = require_SKUFlagsBitField().SKUFlagsBitField;
|
|
57229
58093
|
exports.Status = require_Status();
|
|
57230
|
-
exports.SnowflakeUtil =
|
|
58094
|
+
exports.SnowflakeUtil = require_cjs3().DiscordSnowflake;
|
|
57231
58095
|
exports.Sweepers = require_Sweepers();
|
|
57232
58096
|
exports.SystemChannelFlagsBitField = require_SystemChannelFlagsBitField();
|
|
57233
58097
|
exports.ThreadMemberFlagsBitField = require_ThreadMemberFlagsBitField();
|
|
@@ -57430,14 +58294,27 @@ var require_src = __commonJS((exports) => {
|
|
|
57430
58294
|
__exportStar(require_dist(), exports);
|
|
57431
58295
|
__exportStar(require_dist10(), exports);
|
|
57432
58296
|
});
|
|
57433
|
-
// src/core/types/
|
|
58297
|
+
// src/core/types/Ui.ts
|
|
57434
58298
|
var import_discord = __toESM(require_src(), 1);
|
|
58299
|
+
var TextSize;
|
|
58300
|
+
((TextSize2) => {
|
|
58301
|
+
TextSize2[TextSize2["Title"] = 1] = "Title";
|
|
58302
|
+
TextSize2[TextSize2["Subtitle"] = 2] = "Subtitle";
|
|
58303
|
+
TextSize2[TextSize2["Section"] = 3] = "Section";
|
|
58304
|
+
TextSize2[TextSize2["Small"] = 4] = "Small";
|
|
58305
|
+
})(TextSize ||= {});
|
|
58306
|
+
var SeparatorSize = {
|
|
58307
|
+
Small: import_discord.SeparatorSpacingSize.Small,
|
|
58308
|
+
Large: import_discord.SeparatorSpacingSize.Large
|
|
58309
|
+
};
|
|
58310
|
+
// src/core/types/Command.ts
|
|
58311
|
+
var import_discord2 = __toESM(require_src(), 1);
|
|
57435
58312
|
var CommandType;
|
|
57436
58313
|
((CommandType2) => {
|
|
57437
|
-
CommandType2[CommandType2["ChatInput"] =
|
|
57438
|
-
CommandType2[CommandType2["User"] =
|
|
57439
|
-
CommandType2[CommandType2["Message"] =
|
|
57440
|
-
CommandType2[CommandType2["PrimaryEntryPoint"] =
|
|
58314
|
+
CommandType2[CommandType2["ChatInput"] = import_discord2.ApplicationCommandType.ChatInput] = "ChatInput";
|
|
58315
|
+
CommandType2[CommandType2["User"] = import_discord2.ApplicationCommandType.User] = "User";
|
|
58316
|
+
CommandType2[CommandType2["Message"] = import_discord2.ApplicationCommandType.Message] = "Message";
|
|
58317
|
+
CommandType2[CommandType2["PrimaryEntryPoint"] = import_discord2.ApplicationCommandType.PrimaryEntryPoint] = "PrimaryEntryPoint";
|
|
57441
58318
|
})(CommandType ||= {});
|
|
57442
58319
|
// src/core/types/Responder.ts
|
|
57443
58320
|
var ResponderType;
|
|
@@ -57451,6 +58328,8 @@ var ResponderType;
|
|
|
57451
58328
|
ResponderType2["SelectMentionable"] = "select.mentionable";
|
|
57452
58329
|
})(ResponderType ||= {});
|
|
57453
58330
|
export {
|
|
58331
|
+
TextSize,
|
|
58332
|
+
SeparatorSize,
|
|
57454
58333
|
ResponderType,
|
|
57455
58334
|
CommandType
|
|
57456
58335
|
};
|