nexocord 1.0.3 → 1.0.5
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 +3 -1
- package/dist/core/client/bootstrap.d.ts.map +1 -1
- package/dist/core/creators.d.ts +1 -1
- package/dist/core/creators.d.ts.map +1 -1
- package/dist/core/types/Command.d.ts +1 -1
- package/dist/core/types/Command.d.ts.map +1 -1
- package/dist/core/types/Event.d.ts +1 -1
- package/dist/core/types/Event.d.ts.map +1 -1
- package/dist/core/types/Responder.d.ts +1 -1
- package/dist/core/types/Responder.d.ts.map +1 -1
- package/dist/core/types/Run.d.ts +3 -2
- package/dist/core/types/Run.d.ts.map +1 -1
- package/dist/core/utils/Responder.d.ts +1 -2
- package/dist/core/utils/Responder.d.ts.map +1 -1
- package/dist/index.cjs +29 -43
- package/dist/index.js +29 -43
- package/package.json +3 -2
- package/tsconfig.json +1 -0
- package/dist/core/types/Context.d.ts +0 -11
- package/dist/core/types/Context.d.ts.map +0 -1
package/dist/bin/cli.js
CHANGED
|
@@ -2635,6 +2635,8 @@ Object.defineProperties(createChalk.prototype, styles2);
|
|
|
2635
2635
|
var chalk = createChalk();
|
|
2636
2636
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2637
2637
|
var source_default = chalk;
|
|
2638
|
+
// package.json
|
|
2639
|
+
var version = "1.0.5";
|
|
2638
2640
|
|
|
2639
2641
|
// src/bin/cli.ts
|
|
2640
2642
|
var isBun = typeof globalThis.Bun !== "undefined";
|
|
@@ -2690,7 +2692,7 @@ var log = {
|
|
|
2690
2692
|
info: (msg) => console.log(source_default.blue(msg))
|
|
2691
2693
|
};
|
|
2692
2694
|
var program2 = new Command;
|
|
2693
|
-
program2.name("nexo").description(source_default.gray("Framework moderno para bots Discord com foco em DX e performance")).version(
|
|
2695
|
+
program2.name("nexo").description(source_default.gray("Framework moderno para bots Discord com foco em DX e performance")).version(version).addHelpText("after", `
|
|
2694
2696
|
${source_default.cyan("Docs:")} ${source_default.gray("https://nexocord.vercel.app/")}
|
|
2695
2697
|
`);
|
|
2696
2698
|
program2.command("dev").description("Inicia o bot em modo desenvolvimento").argument("[file]", "Arquivo de entrada").option("-w, --watch", "Reinicia automaticamente ao salvar").option("-r, --runtime <runtime>", "Runtime: bun ou node", "auto").action((file, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../src/core/client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../src/core/client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAK9C,UAAU,KAAK;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS;kBACO,OAAO;CAsC5B,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/core/creators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ClientEvents } from 'discord.js';
|
|
2
|
-
import { Command, CommandType, Event, Responder, ResponderParser, ResponderTypes } from '
|
|
2
|
+
import { Command, CommandType, Event, Responder, ResponderParser, ResponderTypes } from './types';
|
|
3
3
|
export declare const createCommand: <T extends CommandType>(command: Command<T>) => Command<T>, createSubcommand: (name: string, directory: string) => Promise<any>, createEvent: <K extends keyof ClientEvents>(options: Event<K>) => Event<K>, createResponder: <const Path extends string, const Type extends ResponderTypes, Parse extends ResponderParser<Path> | undefined = undefined>(opts: Responder<Path, Type, Parse>) => Responder<Path, Type, Parse>;
|
|
4
4
|
//# sourceMappingURL=creators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../src/core/creators.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,YAAY,EAIb,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../src/core/creators.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,YAAY,EAIb,MAAM,YAAY,CAAC;AAQpB,OAAO,EACL,OAAO,EACP,WAAW,EACX,KAAK,EACL,SAAS,EACT,eAAe,EACf,cAAc,EACf,MAAM,SAAS,CAAC;AAsFjB,eAAO,MAAQ,aAAa,GAjFC,CAAC,SAAS,WAAW,WAAW,OAAO,CAAC,CAAC,CAAC,iBAiFzC,gBAAgB,SA7EF,MAAM,aAAa,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC,EA6EpC,WAAW,GAhBhC,CAAC,SAAS,MAAM,YAAY,WAAW,KAAK,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,CAAC,CAAC,EAgBxB,eAAe,SAXhE,IAAI,SAAS,MAAM,QACnB,IAAI,SAAS,cAAc,EACjC,KAAK,SAAS,eAAe,CAAC,IAAI,CAAC,GAAG,SAAS,oBACzC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,iCAS5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatInputCommandInteraction, UserContextMenuCommandInteraction, MessageContextMenuCommandInteraction, ContextMenuCommandInteraction, APIApplicationCommandOption, PermissionResolvable, PermissionFlagsBits } from 'discord.js';
|
|
2
|
-
import { RunCommand, RunAutoComplete } from '
|
|
2
|
+
import { RunCommand, RunAutoComplete } from './Run';
|
|
3
3
|
export declare enum CommandType {
|
|
4
4
|
ChatInput = 1,
|
|
5
5
|
User = 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/core/types/Command.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,EACpC,6BAA6B,EAC7B,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/core/types/Command.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,EACpC,6BAA6B,EAC7B,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAEpD,oBAAY,WAAW;IACrB,SAAS,IAAmC;IAC5C,IAAI,IAA8B;IAClC,OAAO,IAAiC;IACxC,iBAAiB,IAA2C;CAC7D;AAED,MAAM,MAAM,kBAAkB,CAAC,IAAI,SAAS,WAAW,GAAG,WAAW,IACnE,IAAI,SAAS,WAAW,CAAC,SAAS,GAC9B,2BAA2B,GAC3B,IAAI,SAAS,WAAW,CAAC,IAAI,GAC3B,iCAAiC,GACjC,IAAI,SAAS,WAAW,CAAC,OAAO,GAC9B,oCAAoC,GACpC,IAAI,SAAS,WAAW,CAAC,iBAAiB,GACxC,6BAA6B,GAC7B,KAAK,CAAC;AAElB,MAAM,MAAM,OAAO,CAAC,IAAI,SAAS,WAAW,GAAG,WAAW,IAAI;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,2BAA2B,EAAE,CAAC;IAExC,uBAAuB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtD,aAAa,CAAC,EAAE,MAAM,OAAO,mBAAmB,GAAG,IAAI,CAAC;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE3B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../src/core/types/Event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../src/core/types/Event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,IAAI;IACrE,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;CAClB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonInteraction, ModalSubmitInteraction, StringSelectMenuInteraction, UserSelectMenuInteraction, RoleSelectMenuInteraction, ChannelSelectMenuInteraction, MentionableSelectMenuInteraction } from 'discord.js';
|
|
2
2
|
import { ZodTypeAny, infer as zInfer } from 'zod/v3';
|
|
3
|
-
import { RunResponder } from '
|
|
3
|
+
import type { RunResponder } from './Run';
|
|
4
4
|
export declare enum ResponderType {
|
|
5
5
|
Button = "button",
|
|
6
6
|
Modal = "modal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Responder.d.ts","sourceRoot":"","sources":["../../../src/core/types/Responder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Responder.d.ts","sourceRoot":"","sources":["../../../src/core/types/Responder.ts"],"names":[],"mappings":"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"}
|
package/dist/core/types/Run.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AutocompleteInteraction, ClientEvents } from 'discord.js';
|
|
2
|
-
import { ExtendedClient } from '
|
|
3
|
-
import { CommandInteraction, CommandType
|
|
2
|
+
import type { ExtendedClient } from '../client/ExtendedClient';
|
|
3
|
+
import type { CommandInteraction, CommandType } from './Command';
|
|
4
|
+
import type { ResponderParse } from './Responder';
|
|
4
5
|
export type RunEvent<K extends keyof ClientEvents = keyof ClientEvents> = (...args: [...ClientEvents[K], ExtendedClient]) => any;
|
|
5
6
|
export type RunCommand<T extends CommandType> = (interaction: CommandInteraction<T>, client?: ExtendedClient) => any;
|
|
6
7
|
export type RunResponder<I, Path extends string, P = undefined> = (interaction: I, params: ResponderParse<P, Path>) => unknown | Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Run.d.ts","sourceRoot":"","sources":["../../../src/core/types/Run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Run.d.ts","sourceRoot":"","sources":["../../../src/core/types/Run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,IAAI,CACxE,GAAG,IAAI,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,KAC1C,GAAG,CAAC;AAGT,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI,CAC9C,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAClC,MAAM,CAAC,EAAE,cAAc,KACpB,GAAG,CAAC;AAGT,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM,EAAE,CAAC,GAAG,SAAS,IAAI,CAChE,WAAW,EAAE,CAAC,EACd,MAAM,EAAE,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,KAC5B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Interaction } from 'discord.js';
|
|
2
|
-
import { ResponderType } from '../types
|
|
3
|
-
import type { ResponderInteraction } from '@types';
|
|
2
|
+
import { ResponderType, type ResponderInteraction } from '../types';
|
|
4
3
|
export declare function getType(interaction: Interaction): ResponderType | null;
|
|
5
4
|
export declare function isResponder(interaction: Interaction): interaction is ResponderInteraction<ResponderType>;
|
|
6
5
|
//# sourceMappingURL=Responder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Responder.d.ts","sourceRoot":"","sources":["../../../src/core/utils/Responder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"Responder.d.ts","sourceRoot":"","sources":["../../../src/core/utils/Responder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEpE,wBAAgB,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,GAAG,IAAI,CAStE;AAED,wBAAgB,WAAW,CACzB,WAAW,EAAE,WAAW,GACvB,WAAW,IAAI,oBAAoB,CAAC,aAAa,CAAC,CAUpD"}
|
package/dist/index.cjs
CHANGED
|
@@ -57470,10 +57470,6 @@ __export(exports_src, {
|
|
|
57470
57470
|
});
|
|
57471
57471
|
module.exports = __toCommonJS(exports_src);
|
|
57472
57472
|
|
|
57473
|
-
// src/core/client/bootstrap.ts
|
|
57474
|
-
var import_node_fs = require("node:fs");
|
|
57475
|
-
var import_node_path2 = __toESM(require("node:path"));
|
|
57476
|
-
|
|
57477
57473
|
// src/core/client/ExtendedClient.ts
|
|
57478
57474
|
var import_discord = __toESM(require_src(), 1);
|
|
57479
57475
|
var intents = [
|
|
@@ -57495,7 +57491,7 @@ class ExtendedClient extends import_discord.Client {
|
|
|
57495
57491
|
}
|
|
57496
57492
|
}
|
|
57497
57493
|
// src/core/modules/commands/handler.ts
|
|
57498
|
-
var
|
|
57494
|
+
var import_discord4 = __toESM(require_src(), 1);
|
|
57499
57495
|
var import_fs2 = require("fs");
|
|
57500
57496
|
var import_path2 = __toESM(require("path"));
|
|
57501
57497
|
var import_url2 = require("url");
|
|
@@ -58048,6 +58044,15 @@ var logger = {
|
|
|
58048
58044
|
success,
|
|
58049
58045
|
error
|
|
58050
58046
|
};
|
|
58047
|
+
// src/core/types/Command.ts
|
|
58048
|
+
var import_discord2 = __toESM(require_src(), 1);
|
|
58049
|
+
var CommandType;
|
|
58050
|
+
((CommandType2) => {
|
|
58051
|
+
CommandType2[CommandType2["ChatInput"] = import_discord2.ApplicationCommandType.ChatInput] = "ChatInput";
|
|
58052
|
+
CommandType2[CommandType2["User"] = import_discord2.ApplicationCommandType.User] = "User";
|
|
58053
|
+
CommandType2[CommandType2["Message"] = import_discord2.ApplicationCommandType.Message] = "Message";
|
|
58054
|
+
CommandType2[CommandType2["PrimaryEntryPoint"] = import_discord2.ApplicationCommandType.PrimaryEntryPoint] = "PrimaryEntryPoint";
|
|
58055
|
+
})(CommandType ||= {});
|
|
58051
58056
|
// src/core/types/Responder.ts
|
|
58052
58057
|
var ResponderType;
|
|
58053
58058
|
((ResponderType2) => {
|
|
@@ -58059,7 +58064,6 @@ var ResponderType;
|
|
|
58059
58064
|
ResponderType2["SelectChannel"] = "select.channel";
|
|
58060
58065
|
ResponderType2["SelectMentionable"] = "select.mentionable";
|
|
58061
58066
|
})(ResponderType ||= {});
|
|
58062
|
-
|
|
58063
58067
|
// src/core/utils/Responder.ts
|
|
58064
58068
|
function getType(interaction) {
|
|
58065
58069
|
if (interaction.isButton())
|
|
@@ -58082,7 +58086,7 @@ function isResponder(interaction) {
|
|
|
58082
58086
|
return interaction.isButton() || interaction.isModalSubmit() || interaction.isStringSelectMenu() || interaction.isUserSelectMenu() || interaction.isRoleSelectMenu() || interaction.isChannelSelectMenu() || interaction.isMentionableSelectMenu();
|
|
58083
58087
|
}
|
|
58084
58088
|
// src/core/creators.ts
|
|
58085
|
-
var
|
|
58089
|
+
var import_discord3 = __toESM(require_src(), 1);
|
|
58086
58090
|
var import_fs = require("fs");
|
|
58087
58091
|
var import_path = __toESM(require("path"));
|
|
58088
58092
|
var import_url = require("url");
|
|
@@ -58108,7 +58112,7 @@ function Creators() {
|
|
|
58108
58112
|
}
|
|
58109
58113
|
subcommands[sub.name] = sub;
|
|
58110
58114
|
options.push({
|
|
58111
|
-
type:
|
|
58115
|
+
type: import_discord3.ApplicationCommandOptionType.Subcommand,
|
|
58112
58116
|
name: sub.name,
|
|
58113
58117
|
description: sub.description,
|
|
58114
58118
|
options: sub.options
|
|
@@ -58120,7 +58124,7 @@ function Creators() {
|
|
|
58120
58124
|
return {
|
|
58121
58125
|
name,
|
|
58122
58126
|
description: `Comando ${name} com subcomandos`,
|
|
58123
|
-
type:
|
|
58127
|
+
type: import_discord3.ApplicationCommandType.ChatInput,
|
|
58124
58128
|
options,
|
|
58125
58129
|
autocomplete: (i, focused) => {
|
|
58126
58130
|
const name2 = i.options.getSubcommand();
|
|
@@ -58159,14 +58163,14 @@ async function CheckPermission(i, command) {
|
|
|
58159
58163
|
if (command.allowIds && command.allowIds.length > 0 && !command.allowIds.includes(i.user.id)) {
|
|
58160
58164
|
await i.reply({
|
|
58161
58165
|
content: "Você não tem permissão para usar este subcomando",
|
|
58162
|
-
flags: [
|
|
58166
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58163
58167
|
});
|
|
58164
58168
|
return false;
|
|
58165
58169
|
}
|
|
58166
58170
|
if (command.botpermission && !i.guild?.members.me?.permissions.has(command.botpermission)) {
|
|
58167
58171
|
await i.reply({
|
|
58168
58172
|
content: `Eu preciso da permissão **${command.botpermission}** para executar este subcomando.`,
|
|
58169
|
-
flags: [
|
|
58173
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58170
58174
|
});
|
|
58171
58175
|
return false;
|
|
58172
58176
|
}
|
|
@@ -58174,7 +58178,7 @@ async function CheckPermission(i, command) {
|
|
|
58174
58178
|
if (!member.permissions.has(command.defaultMemberPermission)) {
|
|
58175
58179
|
await i.reply({
|
|
58176
58180
|
content: "Você não tem permissão para usar este subcomando.",
|
|
58177
|
-
flags: [
|
|
58181
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58178
58182
|
});
|
|
58179
58183
|
return false;
|
|
58180
58184
|
}
|
|
@@ -58182,14 +58186,14 @@ async function CheckPermission(i, command) {
|
|
|
58182
58186
|
if (command.nsfw && i.channel && "nsfw" in i.channel && !i.channel.nsfw) {
|
|
58183
58187
|
await i.reply({
|
|
58184
58188
|
content: "Este subcomando só pode ser usado em canais NSFW.",
|
|
58185
|
-
flags: [
|
|
58189
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58186
58190
|
});
|
|
58187
58191
|
return false;
|
|
58188
58192
|
}
|
|
58189
58193
|
if (i.guild === null && command.dmPermission === false) {
|
|
58190
58194
|
await i.reply({
|
|
58191
58195
|
content: "Este comando não pode ser usado em DMs.",
|
|
58192
|
-
flags: [
|
|
58196
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58193
58197
|
});
|
|
58194
58198
|
return false;
|
|
58195
58199
|
}
|
|
@@ -58256,14 +58260,14 @@ async function registerCommands(client, commands, token) {
|
|
|
58256
58260
|
logger.error("Token não definido para registrar comandos.");
|
|
58257
58261
|
process.exit(1);
|
|
58258
58262
|
}
|
|
58259
|
-
const rest = new
|
|
58263
|
+
const rest = new import_discord4.REST({ version: "10" }).setToken(Token);
|
|
58260
58264
|
try {
|
|
58261
58265
|
if (settings.bot.guildID && settings.bot.guildID?.length > 0) {
|
|
58262
58266
|
const guilds = settings.bot.guildID;
|
|
58263
58267
|
const servers = await Promise.all(guilds.map(async (ID) => {
|
|
58264
58268
|
try {
|
|
58265
58269
|
const guild = await client.guilds.fetch(ID).catch(() => null);
|
|
58266
|
-
await rest.put(
|
|
58270
|
+
await rest.put(import_discord4.Routes.applicationGuildCommands(client.user.id, ID), {
|
|
58267
58271
|
body: commands
|
|
58268
58272
|
});
|
|
58269
58273
|
return {
|
|
@@ -58285,7 +58289,7 @@ async function registerCommands(client, commands, token) {
|
|
|
58285
58289
|
logger.info(JSON.stringify(servers, null, 2));
|
|
58286
58290
|
}
|
|
58287
58291
|
} else {
|
|
58288
|
-
await rest.put(
|
|
58292
|
+
await rest.put(import_discord4.Routes.applicationCommands(client.user.id), {
|
|
58289
58293
|
body: commands
|
|
58290
58294
|
});
|
|
58291
58295
|
if (settings.terminal.showSlashCommandsRegistred) {
|
|
@@ -58310,10 +58314,10 @@ function serialize(command) {
|
|
|
58310
58314
|
};
|
|
58311
58315
|
}
|
|
58312
58316
|
// src/core/modules/commands/manager.ts
|
|
58313
|
-
var
|
|
58317
|
+
var import_discord5 = __toESM(require_src(), 1);
|
|
58314
58318
|
|
|
58315
58319
|
class CommandManager {
|
|
58316
|
-
commands = new
|
|
58320
|
+
commands = new import_discord5.Collection;
|
|
58317
58321
|
add(command) {
|
|
58318
58322
|
this.commands.set(command.name, command);
|
|
58319
58323
|
}
|
|
@@ -61614,8 +61618,8 @@ var ji = Bt;
|
|
|
61614
61618
|
var Ii = Object.assign(Qe, { sync: Bt });
|
|
61615
61619
|
var zi = Ut;
|
|
61616
61620
|
var Bi = Object.assign(es, { sync: Ut });
|
|
61617
|
-
var
|
|
61618
|
-
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync:
|
|
61621
|
+
var Ui2 = Object.assign(ts, { stream: Bt, iterate: Ut });
|
|
61622
|
+
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui2, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
|
|
61619
61623
|
Ze.glob = Ze;
|
|
61620
61624
|
|
|
61621
61625
|
// src/core/modules/events/handler.ts
|
|
@@ -61662,10 +61666,10 @@ async function registerEvents(client, events) {
|
|
|
61662
61666
|
});
|
|
61663
61667
|
}
|
|
61664
61668
|
// src/core/modules/events/manager.ts
|
|
61665
|
-
var
|
|
61669
|
+
var import_discord6 = __toESM(require_src(), 1);
|
|
61666
61670
|
|
|
61667
61671
|
class EventManager {
|
|
61668
|
-
events = new
|
|
61672
|
+
events = new import_discord6.Collection;
|
|
61669
61673
|
add(event) {
|
|
61670
61674
|
this.events.set(event.name, event);
|
|
61671
61675
|
}
|
|
@@ -64437,15 +64441,6 @@ function setGlobalSettings(settings2) {
|
|
|
64437
64441
|
};
|
|
64438
64442
|
return globalThis.settings;
|
|
64439
64443
|
}
|
|
64440
|
-
// src/core/types/Command.ts
|
|
64441
|
-
var import_discord6 = __toESM(require_src(), 1);
|
|
64442
|
-
var CommandType;
|
|
64443
|
-
((CommandType2) => {
|
|
64444
|
-
CommandType2[CommandType2["ChatInput"] = import_discord6.ApplicationCommandType.ChatInput] = "ChatInput";
|
|
64445
|
-
CommandType2[CommandType2["User"] = import_discord6.ApplicationCommandType.User] = "User";
|
|
64446
|
-
CommandType2[CommandType2["Message"] = import_discord6.ApplicationCommandType.Message] = "Message";
|
|
64447
|
-
CommandType2[CommandType2["PrimaryEntryPoint"] = import_discord6.ApplicationCommandType.PrimaryEntryPoint] = "PrimaryEntryPoint";
|
|
64448
|
-
})(CommandType ||= {});
|
|
64449
64444
|
// src/core/client/Interactions/command.ts
|
|
64450
64445
|
var import_discord7 = __toESM(require_src(), 1);
|
|
64451
64446
|
async function Command2(i) {
|
|
@@ -64503,21 +64498,12 @@ async function Router(i) {
|
|
|
64503
64498
|
}
|
|
64504
64499
|
|
|
64505
64500
|
// src/core/client/bootstrap.ts
|
|
64506
|
-
function resolvePath(candidates, fallback) {
|
|
64507
|
-
for (const candidate of candidates) {
|
|
64508
|
-
const absolute = import_node_path2.default.resolve(process.cwd(), candidate);
|
|
64509
|
-
if (import_node_fs.existsSync(absolute)) {
|
|
64510
|
-
return candidate;
|
|
64511
|
-
}
|
|
64512
|
-
}
|
|
64513
|
-
return fallback;
|
|
64514
|
-
}
|
|
64515
64501
|
var Bootstrap = {
|
|
64516
64502
|
async init(options) {
|
|
64517
64503
|
const Token = options.token ?? process.env.TOKEN ?? "";
|
|
64518
64504
|
const paths = {
|
|
64519
|
-
commands: options.paths?.commands ??
|
|
64520
|
-
events: options.paths?.events ??
|
|
64505
|
+
commands: options.paths?.commands ?? "src/commands",
|
|
64506
|
+
events: options.paths?.events ?? "src/events"
|
|
64521
64507
|
};
|
|
64522
64508
|
setGlobalSettings({
|
|
64523
64509
|
...options.settings ?? {},
|
package/dist/index.js
CHANGED
|
@@ -57431,10 +57431,6 @@ var require_src = __commonJS((exports) => {
|
|
|
57431
57431
|
__exportStar(require_dist10(), exports);
|
|
57432
57432
|
});
|
|
57433
57433
|
|
|
57434
|
-
// src/core/client/bootstrap.ts
|
|
57435
|
-
import { existsSync as existsSync2 } from "node:fs";
|
|
57436
|
-
import path4 from "node:path";
|
|
57437
|
-
|
|
57438
57434
|
// src/core/client/ExtendedClient.ts
|
|
57439
57435
|
var import_discord = __toESM(require_src(), 1);
|
|
57440
57436
|
var intents = [
|
|
@@ -57456,7 +57452,7 @@ class ExtendedClient extends import_discord.Client {
|
|
|
57456
57452
|
}
|
|
57457
57453
|
}
|
|
57458
57454
|
// src/core/modules/commands/handler.ts
|
|
57459
|
-
var
|
|
57455
|
+
var import_discord4 = __toESM(require_src(), 1);
|
|
57460
57456
|
import { existsSync, readdirSync as readdirSync2 } from "fs";
|
|
57461
57457
|
import path2 from "path";
|
|
57462
57458
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
@@ -58009,6 +58005,15 @@ var logger = {
|
|
|
58009
58005
|
success,
|
|
58010
58006
|
error
|
|
58011
58007
|
};
|
|
58008
|
+
// src/core/types/Command.ts
|
|
58009
|
+
var import_discord2 = __toESM(require_src(), 1);
|
|
58010
|
+
var CommandType;
|
|
58011
|
+
((CommandType2) => {
|
|
58012
|
+
CommandType2[CommandType2["ChatInput"] = import_discord2.ApplicationCommandType.ChatInput] = "ChatInput";
|
|
58013
|
+
CommandType2[CommandType2["User"] = import_discord2.ApplicationCommandType.User] = "User";
|
|
58014
|
+
CommandType2[CommandType2["Message"] = import_discord2.ApplicationCommandType.Message] = "Message";
|
|
58015
|
+
CommandType2[CommandType2["PrimaryEntryPoint"] = import_discord2.ApplicationCommandType.PrimaryEntryPoint] = "PrimaryEntryPoint";
|
|
58016
|
+
})(CommandType ||= {});
|
|
58012
58017
|
// src/core/types/Responder.ts
|
|
58013
58018
|
var ResponderType;
|
|
58014
58019
|
((ResponderType2) => {
|
|
@@ -58020,7 +58025,6 @@ var ResponderType;
|
|
|
58020
58025
|
ResponderType2["SelectChannel"] = "select.channel";
|
|
58021
58026
|
ResponderType2["SelectMentionable"] = "select.mentionable";
|
|
58022
58027
|
})(ResponderType ||= {});
|
|
58023
|
-
|
|
58024
58028
|
// src/core/utils/Responder.ts
|
|
58025
58029
|
function getType(interaction) {
|
|
58026
58030
|
if (interaction.isButton())
|
|
@@ -58043,7 +58047,7 @@ function isResponder(interaction) {
|
|
|
58043
58047
|
return interaction.isButton() || interaction.isModalSubmit() || interaction.isStringSelectMenu() || interaction.isUserSelectMenu() || interaction.isRoleSelectMenu() || interaction.isChannelSelectMenu() || interaction.isMentionableSelectMenu();
|
|
58044
58048
|
}
|
|
58045
58049
|
// src/core/creators.ts
|
|
58046
|
-
var
|
|
58050
|
+
var import_discord3 = __toESM(require_src(), 1);
|
|
58047
58051
|
import { readdirSync } from "fs";
|
|
58048
58052
|
import path from "path";
|
|
58049
58053
|
import { pathToFileURL } from "url";
|
|
@@ -58069,7 +58073,7 @@ function Creators() {
|
|
|
58069
58073
|
}
|
|
58070
58074
|
subcommands[sub.name] = sub;
|
|
58071
58075
|
options.push({
|
|
58072
|
-
type:
|
|
58076
|
+
type: import_discord3.ApplicationCommandOptionType.Subcommand,
|
|
58073
58077
|
name: sub.name,
|
|
58074
58078
|
description: sub.description,
|
|
58075
58079
|
options: sub.options
|
|
@@ -58081,7 +58085,7 @@ function Creators() {
|
|
|
58081
58085
|
return {
|
|
58082
58086
|
name,
|
|
58083
58087
|
description: `Comando ${name} com subcomandos`,
|
|
58084
|
-
type:
|
|
58088
|
+
type: import_discord3.ApplicationCommandType.ChatInput,
|
|
58085
58089
|
options,
|
|
58086
58090
|
autocomplete: (i, focused) => {
|
|
58087
58091
|
const name2 = i.options.getSubcommand();
|
|
@@ -58120,14 +58124,14 @@ async function CheckPermission(i, command) {
|
|
|
58120
58124
|
if (command.allowIds && command.allowIds.length > 0 && !command.allowIds.includes(i.user.id)) {
|
|
58121
58125
|
await i.reply({
|
|
58122
58126
|
content: "Você não tem permissão para usar este subcomando",
|
|
58123
|
-
flags: [
|
|
58127
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58124
58128
|
});
|
|
58125
58129
|
return false;
|
|
58126
58130
|
}
|
|
58127
58131
|
if (command.botpermission && !i.guild?.members.me?.permissions.has(command.botpermission)) {
|
|
58128
58132
|
await i.reply({
|
|
58129
58133
|
content: `Eu preciso da permissão **${command.botpermission}** para executar este subcomando.`,
|
|
58130
|
-
flags: [
|
|
58134
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58131
58135
|
});
|
|
58132
58136
|
return false;
|
|
58133
58137
|
}
|
|
@@ -58135,7 +58139,7 @@ async function CheckPermission(i, command) {
|
|
|
58135
58139
|
if (!member.permissions.has(command.defaultMemberPermission)) {
|
|
58136
58140
|
await i.reply({
|
|
58137
58141
|
content: "Você não tem permissão para usar este subcomando.",
|
|
58138
|
-
flags: [
|
|
58142
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58139
58143
|
});
|
|
58140
58144
|
return false;
|
|
58141
58145
|
}
|
|
@@ -58143,14 +58147,14 @@ async function CheckPermission(i, command) {
|
|
|
58143
58147
|
if (command.nsfw && i.channel && "nsfw" in i.channel && !i.channel.nsfw) {
|
|
58144
58148
|
await i.reply({
|
|
58145
58149
|
content: "Este subcomando só pode ser usado em canais NSFW.",
|
|
58146
|
-
flags: [
|
|
58150
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58147
58151
|
});
|
|
58148
58152
|
return false;
|
|
58149
58153
|
}
|
|
58150
58154
|
if (i.guild === null && command.dmPermission === false) {
|
|
58151
58155
|
await i.reply({
|
|
58152
58156
|
content: "Este comando não pode ser usado em DMs.",
|
|
58153
|
-
flags: [
|
|
58157
|
+
flags: [import_discord3.MessageFlags.Ephemeral]
|
|
58154
58158
|
});
|
|
58155
58159
|
return false;
|
|
58156
58160
|
}
|
|
@@ -58217,14 +58221,14 @@ async function registerCommands(client, commands, token) {
|
|
|
58217
58221
|
logger.error("Token não definido para registrar comandos.");
|
|
58218
58222
|
process.exit(1);
|
|
58219
58223
|
}
|
|
58220
|
-
const rest = new
|
|
58224
|
+
const rest = new import_discord4.REST({ version: "10" }).setToken(Token);
|
|
58221
58225
|
try {
|
|
58222
58226
|
if (settings.bot.guildID && settings.bot.guildID?.length > 0) {
|
|
58223
58227
|
const guilds = settings.bot.guildID;
|
|
58224
58228
|
const servers = await Promise.all(guilds.map(async (ID) => {
|
|
58225
58229
|
try {
|
|
58226
58230
|
const guild = await client.guilds.fetch(ID).catch(() => null);
|
|
58227
|
-
await rest.put(
|
|
58231
|
+
await rest.put(import_discord4.Routes.applicationGuildCommands(client.user.id, ID), {
|
|
58228
58232
|
body: commands
|
|
58229
58233
|
});
|
|
58230
58234
|
return {
|
|
@@ -58246,7 +58250,7 @@ async function registerCommands(client, commands, token) {
|
|
|
58246
58250
|
logger.info(JSON.stringify(servers, null, 2));
|
|
58247
58251
|
}
|
|
58248
58252
|
} else {
|
|
58249
|
-
await rest.put(
|
|
58253
|
+
await rest.put(import_discord4.Routes.applicationCommands(client.user.id), {
|
|
58250
58254
|
body: commands
|
|
58251
58255
|
});
|
|
58252
58256
|
if (settings.terminal.showSlashCommandsRegistred) {
|
|
@@ -58271,10 +58275,10 @@ function serialize(command) {
|
|
|
58271
58275
|
};
|
|
58272
58276
|
}
|
|
58273
58277
|
// src/core/modules/commands/manager.ts
|
|
58274
|
-
var
|
|
58278
|
+
var import_discord5 = __toESM(require_src(), 1);
|
|
58275
58279
|
|
|
58276
58280
|
class CommandManager {
|
|
58277
|
-
commands = new
|
|
58281
|
+
commands = new import_discord5.Collection;
|
|
58278
58282
|
add(command) {
|
|
58279
58283
|
this.commands.set(command.name, command);
|
|
58280
58284
|
}
|
|
@@ -61575,8 +61579,8 @@ var ji = Bt;
|
|
|
61575
61579
|
var Ii = Object.assign(Qe, { sync: Bt });
|
|
61576
61580
|
var zi = Ut;
|
|
61577
61581
|
var Bi = Object.assign(es, { sync: Ut });
|
|
61578
|
-
var
|
|
61579
|
-
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync:
|
|
61582
|
+
var Ui2 = Object.assign(ts, { stream: Bt, iterate: Ut });
|
|
61583
|
+
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui2, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
|
|
61580
61584
|
Ze.glob = Ze;
|
|
61581
61585
|
|
|
61582
61586
|
// src/core/modules/events/handler.ts
|
|
@@ -61623,10 +61627,10 @@ async function registerEvents(client, events) {
|
|
|
61623
61627
|
});
|
|
61624
61628
|
}
|
|
61625
61629
|
// src/core/modules/events/manager.ts
|
|
61626
|
-
var
|
|
61630
|
+
var import_discord6 = __toESM(require_src(), 1);
|
|
61627
61631
|
|
|
61628
61632
|
class EventManager {
|
|
61629
|
-
events = new
|
|
61633
|
+
events = new import_discord6.Collection;
|
|
61630
61634
|
add(event) {
|
|
61631
61635
|
this.events.set(event.name, event);
|
|
61632
61636
|
}
|
|
@@ -64398,15 +64402,6 @@ function setGlobalSettings(settings2) {
|
|
|
64398
64402
|
};
|
|
64399
64403
|
return globalThis.settings;
|
|
64400
64404
|
}
|
|
64401
|
-
// src/core/types/Command.ts
|
|
64402
|
-
var import_discord6 = __toESM(require_src(), 1);
|
|
64403
|
-
var CommandType;
|
|
64404
|
-
((CommandType2) => {
|
|
64405
|
-
CommandType2[CommandType2["ChatInput"] = import_discord6.ApplicationCommandType.ChatInput] = "ChatInput";
|
|
64406
|
-
CommandType2[CommandType2["User"] = import_discord6.ApplicationCommandType.User] = "User";
|
|
64407
|
-
CommandType2[CommandType2["Message"] = import_discord6.ApplicationCommandType.Message] = "Message";
|
|
64408
|
-
CommandType2[CommandType2["PrimaryEntryPoint"] = import_discord6.ApplicationCommandType.PrimaryEntryPoint] = "PrimaryEntryPoint";
|
|
64409
|
-
})(CommandType ||= {});
|
|
64410
64405
|
// src/core/client/Interactions/command.ts
|
|
64411
64406
|
var import_discord7 = __toESM(require_src(), 1);
|
|
64412
64407
|
async function Command2(i) {
|
|
@@ -64464,21 +64459,12 @@ async function Router(i) {
|
|
|
64464
64459
|
}
|
|
64465
64460
|
|
|
64466
64461
|
// src/core/client/bootstrap.ts
|
|
64467
|
-
function resolvePath(candidates, fallback) {
|
|
64468
|
-
for (const candidate of candidates) {
|
|
64469
|
-
const absolute = path4.resolve(process.cwd(), candidate);
|
|
64470
|
-
if (existsSync2(absolute)) {
|
|
64471
|
-
return candidate;
|
|
64472
|
-
}
|
|
64473
|
-
}
|
|
64474
|
-
return fallback;
|
|
64475
|
-
}
|
|
64476
64462
|
var Bootstrap = {
|
|
64477
64463
|
async init(options) {
|
|
64478
64464
|
const Token = options.token ?? process.env.TOKEN ?? "";
|
|
64479
64465
|
const paths = {
|
|
64480
|
-
commands: options.paths?.commands ??
|
|
64481
|
-
events: options.paths?.events ??
|
|
64466
|
+
commands: options.paths?.commands ?? "src/commands",
|
|
64467
|
+
events: options.paths?.events ?? "src/events"
|
|
64482
64468
|
};
|
|
64483
64469
|
setGlobalSettings({
|
|
64484
64470
|
...options.settings ?? {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexocord",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Framework TypeScript moderno para criar bots escaláveis do Discord com discord.js v14, apresentando arquitetura modular, cli e utilitários amigáveis para desenvolvedores.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
"node": ">=20"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "bun build src/index.ts --outdir dist --target node --format esm && bun build src/index.ts --target node --format cjs --outfile dist/index.cjs && bun build src/bin/cli.ts --outdir dist/bin --target node --format esm && bunx tsc --emitDeclarationOnly --outDir dist"
|
|
65
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm && bun build src/index.ts --target node --format cjs --outfile dist/index.cjs && bun build src/bin/cli.ts --outdir dist/bin --target node --format esm && bunx tsc --emitDeclarationOnly --outDir dist",
|
|
66
|
+
"publish:pkg": "bun run build && npm publish --access public"
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@types/bun": "latest",
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { App, ExtendedClient } from '@base';
|
|
2
|
-
import type { CommandManager, ResponderManager } from '@modules';
|
|
3
|
-
import type { CooldownManager } from '../utils/Cooldown';
|
|
4
|
-
export interface AppContext {
|
|
5
|
-
client: ExtendedClient;
|
|
6
|
-
app: App;
|
|
7
|
-
commands: CommandManager;
|
|
8
|
-
cooldowns: CooldownManager;
|
|
9
|
-
responders: ResponderManager;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/core/types/Context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,EAAE,gBAAgB,CAAC;CAC9B"}
|