@elara-services/packages 5.3.0 → 6.0.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/package.json +44 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +17 -0
- package/dist/src/interfaces/discord.d.ts +91 -0
- package/dist/src/interfaces/discord.js +2 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +17 -0
- package/dist/src/lib/AES.d.ts +7 -0
- package/dist/src/lib/AES.js +71 -0
- package/dist/src/lib/discord.d.ts +136 -0
- package/dist/src/lib/discord.js +336 -0
- package/dist/src/lib/index.d.ts +8 -0
- package/dist/src/lib/index.js +24 -0
- package/dist/src/lib/languages.d.ts +110 -0
- package/{packages → dist/src/lib}/languages.js +123 -119
- package/dist/src/lib/minesweeper.d.ts +20 -0
- package/{packages → dist/src/lib}/minesweeper.js +67 -77
- package/dist/src/lib/misc.d.ts +1 -0
- package/dist/src/lib/misc.js +72 -0
- package/dist/src/lib/random.d.ts +16 -0
- package/dist/src/lib/random.js +326 -0
- package/dist/src/lib/tasks.d.ts +9 -0
- package/dist/src/lib/tasks.js +68 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/classes/AES.html +145 -0
- package/docs/classes/Minesweeper.html +206 -0
- package/docs/classes/Tasks.html +142 -0
- package/docs/functions/fetch.html +90 -0
- package/docs/functions/find.html +75 -0
- package/docs/functions/randomWeight.html +80 -0
- package/docs/functions/randomWords.html +75 -0
- package/docs/index.html +164 -0
- package/docs/interfaces/ButtonOptions.html +155 -0
- package/docs/interfaces/ModalOptions.html +125 -0
- package/docs/interfaces/RandomWord.html +154 -0
- package/docs/interfaces/SelectOptions.html +160 -0
- package/docs/interfaces/Slash.html +139 -0
- package/docs/interfaces/SlashOptions.html +188 -0
- package/docs/interfaces/TaskCreate.html +104 -0
- package/docs/interfaces/TextInputOptions.html +181 -0
- package/docs/modules.html +103 -0
- package/docs/types/ButtonNumberStyles.html +66 -0
- package/docs/types/ButtonStyles.html +66 -0
- package/docs/types/ChannelTypes.html +66 -0
- package/docs/types/Lang.html +66 -0
- package/docs/types/LangName.html +66 -0
- package/docs/variables/ButtonStyle.html +89 -0
- package/docs/variables/Duration.html +110 -0
- package/docs/variables/Interactions.html +160 -0
- package/docs/variables/SlashBuilder.html +239 -0
- package/docs/variables/langs.html +279 -0
- package/package.json +44 -10
- package/.github/renovate.json +0 -5
- package/CHANGELOG +0 -62
- package/index.d.ts +0 -247
- package/index.js +0 -11
- package/packages/Interactions.js +0 -76
- package/packages/SlashBuilder.js +0 -58
- package/packages/Tasks.js +0 -22
- package/packages/aes256.js +0 -62
- package/packages/duration.js +0 -74
- package/packages/fetch.js +0 -27
- package/packages/random/weight.js +0 -8
- package/packages/random/words.js +0 -300
@@ -0,0 +1,336 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SlashBuilder = exports.Duration = exports.Interactions = exports.ButtonStyle = void 0;
|
4
|
+
const utils_1 = require("@elara-services/utils");
|
5
|
+
const v10_1 = require("discord-api-types/v10");
|
6
|
+
exports.ButtonStyle = { PRIMARY: 1, BLURPLE: 1, SECONDARY: 2, GREY: 2, SUCCESS: 3, GREEN: 3, DANGER: 4, RED: 4, LINK: 5, URL: 5 };
|
7
|
+
exports.Interactions = {
|
8
|
+
button: (options = {}) => {
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10
|
+
if (typeof options.style === "string") {
|
11
|
+
const style = exports.ButtonStyle[options.style];
|
12
|
+
if (style) {
|
13
|
+
options.style = style;
|
14
|
+
}
|
15
|
+
else {
|
16
|
+
options.style = 2;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
if (typeof options.url === "string" && options.url.match(/(https?|discord):\/\//gi)) {
|
20
|
+
options.style = 5;
|
21
|
+
options.id = "";
|
22
|
+
}
|
23
|
+
return {
|
24
|
+
custom_id: (_b = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.custom_id) !== null && _b !== void 0 ? _b : "",
|
25
|
+
label: (_d = (_c = options === null || options === void 0 ? void 0 : options.title) !== null && _c !== void 0 ? _c : options === null || options === void 0 ? void 0 : options.label) !== null && _d !== void 0 ? _d : "",
|
26
|
+
type: (_e = options === null || options === void 0 ? void 0 : options.type) !== null && _e !== void 0 ? _e : 2,
|
27
|
+
style: (options === null || options === void 0 ? void 0 : options.style) ? options.style : 2,
|
28
|
+
disabled: typeof options.disabled === "boolean" ? options.disabled : false,
|
29
|
+
emoji: (_f = options === null || options === void 0 ? void 0 : options.emoji) !== null && _f !== void 0 ? _f : undefined,
|
30
|
+
url: (_g = options === null || options === void 0 ? void 0 : options.url) !== null && _g !== void 0 ? _g : undefined
|
31
|
+
};
|
32
|
+
},
|
33
|
+
select: (options = {}) => {
|
34
|
+
if (options.type === v10_1.ComponentType.StringSelect && !Array.isArray(options.options)) {
|
35
|
+
throw new Error(`[Interactions#select]: The 'options' isn't an array.`);
|
36
|
+
}
|
37
|
+
const data = {
|
38
|
+
custom_id: "",
|
39
|
+
placeholder: "",
|
40
|
+
min_values: 0,
|
41
|
+
max_values: 0,
|
42
|
+
options: [],
|
43
|
+
type: 3,
|
44
|
+
disabled: false,
|
45
|
+
};
|
46
|
+
if (utils_1.is.string(options.id)) {
|
47
|
+
data.custom_id = options.id;
|
48
|
+
}
|
49
|
+
else if (utils_1.is.string(options.custom_id)) {
|
50
|
+
data.custom_id = options.custom_id;
|
51
|
+
}
|
52
|
+
if (utils_1.is.string(options.placeholder)) {
|
53
|
+
data.placeholder = options.placeholder;
|
54
|
+
}
|
55
|
+
else if (utils_1.is.string(options.holder)) {
|
56
|
+
data.placeholder = options.holder;
|
57
|
+
}
|
58
|
+
if (utils_1.is.number(options.max_values)) {
|
59
|
+
data.max_values = options.max_values;
|
60
|
+
}
|
61
|
+
else if (utils_1.is.number(options.max)) {
|
62
|
+
data.max_values = options.max;
|
63
|
+
}
|
64
|
+
if (utils_1.is.number(options.min_values)) {
|
65
|
+
data.min_values = options.min_values;
|
66
|
+
}
|
67
|
+
else if (utils_1.is.number(options.min)) {
|
68
|
+
data.min_values = options.min;
|
69
|
+
}
|
70
|
+
if (utils_1.is.boolean(options.disabled)) {
|
71
|
+
data.disabled = options.disabled;
|
72
|
+
}
|
73
|
+
if (utils_1.is.number(options.type)) {
|
74
|
+
data.type = options.type;
|
75
|
+
}
|
76
|
+
if (utils_1.is.array(options.options)) {
|
77
|
+
data.options === options.options;
|
78
|
+
}
|
79
|
+
return data;
|
80
|
+
},
|
81
|
+
modal: (options = { components: [] }) => {
|
82
|
+
if (!utils_1.is.array(options.components)) {
|
83
|
+
throw new Error(`[Interactions#modal]: 'components' isn't an array, or is empty.`);
|
84
|
+
}
|
85
|
+
const data = {
|
86
|
+
custom_id: "",
|
87
|
+
title: "",
|
88
|
+
components: options.components,
|
89
|
+
};
|
90
|
+
if (utils_1.is.string(options.id)) {
|
91
|
+
data.custom_id = options.id;
|
92
|
+
}
|
93
|
+
else if (utils_1.is.string(options.custom_id)) {
|
94
|
+
data.custom_id = options.custom_id;
|
95
|
+
}
|
96
|
+
if (utils_1.is.string(options.title)) {
|
97
|
+
data.title = options.title;
|
98
|
+
}
|
99
|
+
else if (utils_1.is.string(options.label)) {
|
100
|
+
data.title = options.label;
|
101
|
+
}
|
102
|
+
return data;
|
103
|
+
},
|
104
|
+
textInput: (options = {}, row = false) => {
|
105
|
+
const data = {
|
106
|
+
type: 4,
|
107
|
+
custom_id: "",
|
108
|
+
style: 1,
|
109
|
+
label: "",
|
110
|
+
min_length: 0,
|
111
|
+
max_length: 0,
|
112
|
+
placeholder: "",
|
113
|
+
value: "",
|
114
|
+
required: false,
|
115
|
+
};
|
116
|
+
if (utils_1.is.number(options.type)) {
|
117
|
+
data.type = options.type;
|
118
|
+
}
|
119
|
+
if (utils_1.is.string(options.id)) {
|
120
|
+
data.custom_id = options.id;
|
121
|
+
}
|
122
|
+
else if (utils_1.is.string(options.custom_id)) {
|
123
|
+
data.custom_id = options.custom_id;
|
124
|
+
}
|
125
|
+
if (utils_1.is.string(options.label)) {
|
126
|
+
data.label = options.label;
|
127
|
+
}
|
128
|
+
else if (utils_1.is.string(options.title)) {
|
129
|
+
data.label = options.title;
|
130
|
+
}
|
131
|
+
if (utils_1.is.string(options.placeholder)) {
|
132
|
+
data.placeholder = options.placeholder;
|
133
|
+
}
|
134
|
+
else if (utils_1.is.string(options.holder)) {
|
135
|
+
data.placeholder = options.holder;
|
136
|
+
}
|
137
|
+
if (utils_1.is.boolean(options.required)) {
|
138
|
+
data.required = options.required;
|
139
|
+
}
|
140
|
+
if (utils_1.is.string(options.value)) {
|
141
|
+
data.value = options.value;
|
142
|
+
}
|
143
|
+
if (utils_1.is.number(options.style)) {
|
144
|
+
data.style = options.style;
|
145
|
+
}
|
146
|
+
if (utils_1.is.number(options.min)) {
|
147
|
+
data.min_length = options.min;
|
148
|
+
}
|
149
|
+
else if (utils_1.is.number(options.min_length)) {
|
150
|
+
data.min_length = options.min_length;
|
151
|
+
}
|
152
|
+
if (utils_1.is.number(options.max)) {
|
153
|
+
data.max_length = options.max;
|
154
|
+
}
|
155
|
+
else if (utils_1.is.number(options.max_length)) {
|
156
|
+
data.max_length = options.max_length;
|
157
|
+
}
|
158
|
+
if (row) {
|
159
|
+
return { type: 1, components: [data] };
|
160
|
+
}
|
161
|
+
return data;
|
162
|
+
},
|
163
|
+
};
|
164
|
+
exports.Duration = {
|
165
|
+
parse: (value) => {
|
166
|
+
const MATCHES_ALL = value.match(/\d+\s*[A-Za-z]+/g);
|
167
|
+
if (MATCHES_ALL) {
|
168
|
+
let totalTime = 0;
|
169
|
+
for (const dur of MATCHES_ALL) {
|
170
|
+
const n = dur.match(/\d+/g) || ["0"];
|
171
|
+
const [num, [str]] = [
|
172
|
+
parseInt(n[0]),
|
173
|
+
dur.match(/[A-Za-z]+/g) || ['']
|
174
|
+
];
|
175
|
+
if (isNaN(num)) {
|
176
|
+
totalTime = 0;
|
177
|
+
}
|
178
|
+
else {
|
179
|
+
totalTime += num * exports.Duration.determineTimeType(str);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
if (totalTime) {
|
183
|
+
return totalTime;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
return null;
|
187
|
+
},
|
188
|
+
determineTimeType: (str) => {
|
189
|
+
switch (str) {
|
190
|
+
case "ms":
|
191
|
+
case "millisecond":
|
192
|
+
case "milliseconds": return 1;
|
193
|
+
case "s":
|
194
|
+
case "second":
|
195
|
+
case "seconds": return 1000;
|
196
|
+
case "m":
|
197
|
+
case "min":
|
198
|
+
case "mins":
|
199
|
+
case "minute":
|
200
|
+
case "minutes": return 60 * 1000;
|
201
|
+
case "h":
|
202
|
+
case "hr":
|
203
|
+
case "hour":
|
204
|
+
case "hours": return 60 * 60 * 1000;
|
205
|
+
case "d":
|
206
|
+
case "day":
|
207
|
+
case "days": return 24 * 60 * 60 * 1000;
|
208
|
+
case "w":
|
209
|
+
case "week":
|
210
|
+
case "weeks": return 7 * 24 * 60 * 60 * 1000;
|
211
|
+
case "mo":
|
212
|
+
case "month":
|
213
|
+
case "months": return 30 * 24 * 60 * 60 * 1000;
|
214
|
+
case "y":
|
215
|
+
case "year":
|
216
|
+
case "years": return 365 * 24 * 60 * 60 * 1000;
|
217
|
+
default: return 1;
|
218
|
+
}
|
219
|
+
},
|
220
|
+
validate: (value) => {
|
221
|
+
const MATCHES_ALL = value.match(/\d+\s*[A-Za-z]+/g);
|
222
|
+
if (MATCHES_ALL) {
|
223
|
+
for (const match of MATCHES_ALL) {
|
224
|
+
const [num, str] = [
|
225
|
+
match.match(/\d+/g),
|
226
|
+
match.match(/[A-Za-z]+/g)
|
227
|
+
];
|
228
|
+
if (!num || (num.length !== 1)) {
|
229
|
+
return false;
|
230
|
+
}
|
231
|
+
if (!str || (str.length !== 1)) {
|
232
|
+
return false;
|
233
|
+
}
|
234
|
+
if (!Number.isInteger(parseInt(num[0]))) {
|
235
|
+
return false;
|
236
|
+
}
|
237
|
+
if (!exports.Duration.timeIds.has(str[0])) {
|
238
|
+
return false;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
return true;
|
242
|
+
}
|
243
|
+
return false;
|
244
|
+
},
|
245
|
+
timeIds: new Set([
|
246
|
+
"ms", "millisecond", "milliseconds",
|
247
|
+
"s", "second", "seconds",
|
248
|
+
"m", "min", "mins", "minute", "minutes",
|
249
|
+
"h", "hr", "hrs", "hour", "hours",
|
250
|
+
"d", "day", "days",
|
251
|
+
"w", "week", "weeks",
|
252
|
+
"mo", "month", "months",
|
253
|
+
"y", "year", "years"
|
254
|
+
])
|
255
|
+
};
|
256
|
+
exports.SlashBuilder = {
|
257
|
+
TEXT_BASED_CHANNELS: [
|
258
|
+
0, 5, 11, 12
|
259
|
+
],
|
260
|
+
types: {
|
261
|
+
sub_command: 1,
|
262
|
+
sub_group: 2,
|
263
|
+
string: 3,
|
264
|
+
integer: 4,
|
265
|
+
boolean: 5,
|
266
|
+
user: 6,
|
267
|
+
channel: 7,
|
268
|
+
role: 8,
|
269
|
+
mentionable: 9,
|
270
|
+
number: 10,
|
271
|
+
context: {
|
272
|
+
user: 2,
|
273
|
+
message: 3
|
274
|
+
}
|
275
|
+
},
|
276
|
+
context: {
|
277
|
+
user: (name, options) => exports.SlashBuilder.create(name, "", Object.assign({ type: exports.SlashBuilder.types.context.user }, options)),
|
278
|
+
message: (name, options) => exports.SlashBuilder.create(name, "", Object.assign({ type: exports.SlashBuilder.types.context.message }, options))
|
279
|
+
},
|
280
|
+
choice: (name, value, name_localizations) => {
|
281
|
+
return { name, value, name_localizations };
|
282
|
+
},
|
283
|
+
option: (data) => {
|
284
|
+
var _a, _b;
|
285
|
+
// @ts-ignore
|
286
|
+
const _data = Object.assign({}, data);
|
287
|
+
if ((_a = data.locale) === null || _a === void 0 ? void 0 : _a.names) {
|
288
|
+
_data.name_localizations = data.locale.names;
|
289
|
+
}
|
290
|
+
if ((_b = data.locale) === null || _b === void 0 ? void 0 : _b.descriptions) {
|
291
|
+
_data.description_localizations = data.locale.descriptions;
|
292
|
+
}
|
293
|
+
if ("locale" in _data) {
|
294
|
+
delete _data["locale"];
|
295
|
+
}
|
296
|
+
return _data;
|
297
|
+
},
|
298
|
+
create: (name, description, options = {}) => {
|
299
|
+
var _a, _b;
|
300
|
+
const obj = {
|
301
|
+
name,
|
302
|
+
description,
|
303
|
+
name_localizations: undefined,
|
304
|
+
description_localizations: undefined,
|
305
|
+
options: [],
|
306
|
+
type: 0,
|
307
|
+
dm_permission: false,
|
308
|
+
default_member_permissions: ""
|
309
|
+
};
|
310
|
+
if ((_a = options === null || options === void 0 ? void 0 : options.locale) === null || _a === void 0 ? void 0 : _a.names) {
|
311
|
+
obj.name_localizations = options.locale.names;
|
312
|
+
}
|
313
|
+
if ((_b = options === null || options === void 0 ? void 0 : options.locale) === null || _b === void 0 ? void 0 : _b.descriptions) {
|
314
|
+
obj.description_localizations = options.locale.descriptions;
|
315
|
+
}
|
316
|
+
if (utils_1.is.array(options.options)) {
|
317
|
+
obj['options'] = options.options;
|
318
|
+
}
|
319
|
+
if (utils_1.is.number(options.type)) {
|
320
|
+
obj.type = options.type;
|
321
|
+
}
|
322
|
+
if ("dmPermission" in options && utils_1.is.boolean(options.dmPermission)) {
|
323
|
+
obj["dm_permission"] = options.dmPermission;
|
324
|
+
}
|
325
|
+
else if ("dm_permission" in options && utils_1.is.boolean(options.dm_permission)) {
|
326
|
+
obj["dm_permission"] = options.dm_permission;
|
327
|
+
}
|
328
|
+
if ("default_member_permissions" in options && utils_1.is.string(options.default_member_permissions)) {
|
329
|
+
obj.default_member_permissions = options.default_member_permissions;
|
330
|
+
}
|
331
|
+
else if ("defaultMemberPermissions" in options && utils_1.is.string(options.defaultMemberPermissions)) {
|
332
|
+
obj.default_member_permissions = options.defaultMemberPermissions;
|
333
|
+
}
|
334
|
+
return obj;
|
335
|
+
}
|
336
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("../interfaces"), exports);
|
18
|
+
__exportStar(require("./AES"), exports);
|
19
|
+
__exportStar(require("./discord"), exports);
|
20
|
+
__exportStar(require("./languages"), exports);
|
21
|
+
__exportStar(require("./minesweeper"), exports);
|
22
|
+
__exportStar(require("./misc"), exports);
|
23
|
+
__exportStar(require("./random"), exports);
|
24
|
+
__exportStar(require("./tasks"), exports);
|
@@ -0,0 +1,110 @@
|
|
1
|
+
export declare const langs: {
|
2
|
+
en: string;
|
3
|
+
fr: string;
|
4
|
+
es: string;
|
5
|
+
pt: string;
|
6
|
+
tr: string;
|
7
|
+
ru: string;
|
8
|
+
ar: string;
|
9
|
+
af: string;
|
10
|
+
sq: string;
|
11
|
+
am: string;
|
12
|
+
hy: string;
|
13
|
+
az: string;
|
14
|
+
eu: string;
|
15
|
+
be: string;
|
16
|
+
bn: string;
|
17
|
+
bs: string;
|
18
|
+
bg: string;
|
19
|
+
ca: string;
|
20
|
+
ceb: string;
|
21
|
+
ny: string;
|
22
|
+
zh: string;
|
23
|
+
'zh-tw': string;
|
24
|
+
co: string;
|
25
|
+
hr: string;
|
26
|
+
cs: string;
|
27
|
+
da: string;
|
28
|
+
nl: string;
|
29
|
+
eo: string;
|
30
|
+
et: string;
|
31
|
+
tl: string;
|
32
|
+
fi: string;
|
33
|
+
fy: string;
|
34
|
+
gl: string;
|
35
|
+
ka: string;
|
36
|
+
de: string;
|
37
|
+
el: string;
|
38
|
+
gu: string;
|
39
|
+
ht: string;
|
40
|
+
ha: string;
|
41
|
+
haw: string;
|
42
|
+
he: string;
|
43
|
+
iw: string;
|
44
|
+
hi: string;
|
45
|
+
hmn: string;
|
46
|
+
hu: string;
|
47
|
+
is: string;
|
48
|
+
ig: string;
|
49
|
+
id: string;
|
50
|
+
ga: string;
|
51
|
+
it: string;
|
52
|
+
ja: string;
|
53
|
+
jw: string;
|
54
|
+
kn: string;
|
55
|
+
kk: string;
|
56
|
+
km: string;
|
57
|
+
ko: string;
|
58
|
+
ku: string;
|
59
|
+
ky: string;
|
60
|
+
lo: string;
|
61
|
+
la: string;
|
62
|
+
lv: string;
|
63
|
+
lt: string;
|
64
|
+
lb: string;
|
65
|
+
mk: string;
|
66
|
+
mg: string;
|
67
|
+
ms: string;
|
68
|
+
ml: string;
|
69
|
+
mt: string;
|
70
|
+
mi: string;
|
71
|
+
mr: string;
|
72
|
+
mn: string;
|
73
|
+
my: string;
|
74
|
+
ne: string;
|
75
|
+
no: string;
|
76
|
+
ps: string;
|
77
|
+
fa: string;
|
78
|
+
pl: string;
|
79
|
+
pa: string;
|
80
|
+
ro: string;
|
81
|
+
sm: string;
|
82
|
+
gd: string;
|
83
|
+
sr: string;
|
84
|
+
st: string;
|
85
|
+
sn: string;
|
86
|
+
sd: string;
|
87
|
+
si: string;
|
88
|
+
sk: string;
|
89
|
+
sl: string;
|
90
|
+
so: string;
|
91
|
+
su: string;
|
92
|
+
sw: string;
|
93
|
+
sv: string;
|
94
|
+
tg: string;
|
95
|
+
ta: string;
|
96
|
+
te: string;
|
97
|
+
th: string;
|
98
|
+
uk: string;
|
99
|
+
ur: string;
|
100
|
+
uz: string;
|
101
|
+
vi: string;
|
102
|
+
cy: string;
|
103
|
+
xh: string;
|
104
|
+
yi: string;
|
105
|
+
yo: string;
|
106
|
+
zu: string;
|
107
|
+
};
|
108
|
+
export declare function find(name: Lang | LangName): "ms" | "hr" | "en" | "fr" | "es" | "pt" | "tr" | "ru" | "ar" | "af" | "sq" | "am" | "hy" | "az" | "eu" | "be" | "bn" | "bs" | "bg" | "ca" | "ceb" | "ny" | "zh" | "zh-tw" | "co" | "cs" | "da" | "nl" | "eo" | "et" | "tl" | "fi" | "fy" | "gl" | "ka" | "de" | "el" | "gu" | "ht" | "ha" | "haw" | "he" | "iw" | "hi" | "hmn" | "hu" | "is" | "ig" | "id" | "ga" | "it" | "ja" | "jw" | "kn" | "kk" | "km" | "ko" | "ku" | "ky" | "lo" | "la" | "lv" | "lt" | "lb" | "mk" | "mg" | "ml" | "mt" | "mi" | "mr" | "mn" | "my" | "ne" | "no" | "ps" | "fa" | "pl" | "pa" | "ro" | "sm" | "gd" | "sr" | "st" | "sn" | "sd" | "si" | "sk" | "sl" | "so" | "su" | "sw" | "sv" | "tg" | "ta" | "te" | "th" | "uk" | "ur" | "uz" | "vi" | "cy" | "xh" | "yi" | "yo" | "zu" | null;
|
109
|
+
export type Lang = keyof typeof langs;
|
110
|
+
export type LangName = 'English' | 'French' | 'Spanish' | 'Portuguese' | 'Turkish' | 'Russian' | 'Arabic' | 'Afrikaans' | 'Albanian' | 'Amharic' | 'Armenian' | 'Azerbaijani' | 'Basque' | 'Belarusian' | 'Bengali' | 'Bosnian' | 'Bulgarian' | 'Catalan' | 'Cebuano' | 'Chichewa' | 'Chinese (Simplified)' | 'Chinese (Traditional)' | 'Corsican' | 'Croatian' | 'Czech' | 'Danish' | 'Dutch' | 'Esperanto' | 'Estonian' | 'Filipino' | 'Finnish' | 'Frisian' | 'Galician' | 'Georgian' | 'German' | 'Greek' | 'Gujarati' | 'Haitian Creole' | 'Hausa' | 'Hawaiian' | 'Hebrew' | 'Hebrew' | 'Hindi' | 'Hmong' | 'Hungarian' | 'Icelandic' | 'Igbo' | 'Indonesian' | 'Irish' | 'Italian' | 'Japanese' | 'Javanese' | 'Kannada' | 'Kazakh' | 'Khmer' | 'Korean' | 'Kurdish (Kurmanji)' | 'Kyrgyz' | 'Lao' | 'Latin' | 'Latvian' | 'Lithuanian' | 'Luxembourgish' | 'Macedonian' | 'Malagasy' | 'Malay' | 'Malayalam' | 'Maltese' | 'Maori' | 'Marathi' | 'Mongolian' | 'Myanmar (Burmese)' | 'Nepali' | 'Norwegian' | 'Pashto' | 'Persian' | 'Polish' | 'Punjabi' | 'Romanian' | 'Samoan' | 'Scots Gaelic' | 'Serbian' | 'Sesotho' | 'Shona' | 'Sindhi' | 'Sinhala' | 'Slovak' | 'Slovenian' | 'Somali' | 'Sundanese' | 'Swahili' | 'Swedish' | 'Tajik' | 'Tamil' | 'Telugu' | 'Thai' | 'Ukrainian' | 'Urdu' | 'Uzbek' | 'Vietnamese' | 'Welsh' | 'Xhosa' | 'Yiddish' | 'Yoruba' | 'Zulu';
|