bakit 1.0.0-beta.7 → 1.0.0-beta.8
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.
|
@@ -145,7 +145,7 @@ declare const Arg: {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
declare namespace CommandAPI {
|
|
148
|
-
function use(
|
|
148
|
+
function use(root: RootCommandEntry): (target: ConstructorLike) => void;
|
|
149
149
|
function getRoot(constructor: ConstructorLike): RootCommandEntry | undefined;
|
|
150
150
|
}
|
|
151
151
|
declare function CommandFactory(options: CreateCommandOptions<BaseCommandEntryOptions> | string): RootCommandEntry;
|
package/dist/command/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as Arg, h as ArgumentOptions, f as ArgumentType, g as BaseArgumentOptions, m as BaseCommandEntry, k as BaseCommandEntryOptions, n as BaseCommandGroupEntry, x as BaseContext, y as ChatInputContext, u as ChatInputContextSendOptions, s as Command, q as CommandAPI, r as CommandFactory, o as CommandGroupEntry, j as CommandHook, t as CommandRegistry, D as Context, w as ContextSendOptions, l as CreateCommandOptions, E as ErrorCommandHookMethod, I as IntegerArgumentOptions, i as MainCommandHookMethod, M as MemberArgumentOptions, z as MessageContext, v as MessageContextSendOptions, N as NumberArgumentOptions, R as RootCommandEntry, S as StringArgumentOptions, p as SubcommandEntry, U as UserArgumentOptions } from '../BakitClient-
|
|
1
|
+
export { A as Arg, h as ArgumentOptions, f as ArgumentType, g as BaseArgumentOptions, m as BaseCommandEntry, k as BaseCommandEntryOptions, n as BaseCommandGroupEntry, x as BaseContext, y as ChatInputContext, u as ChatInputContextSendOptions, s as Command, q as CommandAPI, r as CommandFactory, o as CommandGroupEntry, j as CommandHook, t as CommandRegistry, D as Context, w as ContextSendOptions, l as CreateCommandOptions, E as ErrorCommandHookMethod, I as IntegerArgumentOptions, i as MainCommandHookMethod, M as MemberArgumentOptions, z as MessageContext, v as MessageContextSendOptions, N as NumberArgumentOptions, R as RootCommandEntry, S as StringArgumentOptions, p as SubcommandEntry, U as UserArgumentOptions } from '../BakitClient-D9kRvFS3.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import 'type-fest';
|
package/dist/command/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// src/command/index.ts
|
|
2
|
-
import "reflect-metadata";
|
|
3
|
-
|
|
4
1
|
// src/command/argument/Argument.ts
|
|
5
2
|
var ArgumentType = /* @__PURE__ */ ((ArgumentType2) => {
|
|
6
3
|
ArgumentType2["String"] = "string";
|
|
@@ -202,16 +199,16 @@ var SubcommandEntry = class extends BaseCommandEntry {
|
|
|
202
199
|
// src/command/Command.ts
|
|
203
200
|
var CommandAPI;
|
|
204
201
|
((CommandAPI2) => {
|
|
205
|
-
const
|
|
206
|
-
function use(
|
|
202
|
+
const rootEntries = /* @__PURE__ */ new WeakMap();
|
|
203
|
+
function use(root) {
|
|
207
204
|
return (target) => {
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
root.setTarget(target);
|
|
206
|
+
rootEntries.set(target, root);
|
|
210
207
|
};
|
|
211
208
|
}
|
|
212
209
|
CommandAPI2.use = use;
|
|
213
210
|
function getRoot(constructor) {
|
|
214
|
-
return
|
|
211
|
+
return rootEntries.get(constructor);
|
|
215
212
|
}
|
|
216
213
|
CommandAPI2.getRoot = getRoot;
|
|
217
214
|
})(CommandAPI || (CommandAPI = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseEntry, C as ConstructorLike, a as BaseHook, b as BaseMainHookMethod, c as BaseErrorHookMethod, d as BakitClient } from './BakitClient-
|
|
2
|
-
export { A as Arg, h as ArgumentOptions, f as ArgumentType, e as BakitClientOptions, g as BaseArgumentOptions, m as BaseCommandEntry, k as BaseCommandEntryOptions, n as BaseCommandGroupEntry, x as BaseContext, y as ChatInputContext, u as ChatInputContextSendOptions, s as Command, q as CommandAPI, r as CommandFactory, o as CommandGroupEntry, j as CommandHook, t as CommandRegistry, J as CommandSyntaxError, H as CommandSyntaxErrorOptions, F as CommandSyntaxErrorType, D as Context, w as ContextSendOptions, l as CreateCommandOptions, E as ErrorCommandHookMethod, G as GetSyntaxErrorMessageFunction, I as IntegerArgumentOptions, i as MainCommandHookMethod, M as MemberArgumentOptions, z as MessageContext, v as MessageContextSendOptions, N as NumberArgumentOptions, R as RootCommandEntry, S as StringArgumentOptions, p as SubcommandEntry, U as UserArgumentOptions } from './BakitClient-
|
|
1
|
+
import { B as BaseEntry, C as ConstructorLike, a as BaseHook, b as BaseMainHookMethod, c as BaseErrorHookMethod, d as BakitClient } from './BakitClient-D9kRvFS3.js';
|
|
2
|
+
export { A as Arg, h as ArgumentOptions, f as ArgumentType, e as BakitClientOptions, g as BaseArgumentOptions, m as BaseCommandEntry, k as BaseCommandEntryOptions, n as BaseCommandGroupEntry, x as BaseContext, y as ChatInputContext, u as ChatInputContextSendOptions, s as Command, q as CommandAPI, r as CommandFactory, o as CommandGroupEntry, j as CommandHook, t as CommandRegistry, J as CommandSyntaxError, H as CommandSyntaxErrorOptions, F as CommandSyntaxErrorType, D as Context, w as ContextSendOptions, l as CreateCommandOptions, E as ErrorCommandHookMethod, G as GetSyntaxErrorMessageFunction, I as IntegerArgumentOptions, i as MainCommandHookMethod, M as MemberArgumentOptions, z as MessageContext, v as MessageContextSendOptions, N as NumberArgumentOptions, R as RootCommandEntry, S as StringArgumentOptions, p as SubcommandEntry, U as UserArgumentOptions } from './BakitClient-D9kRvFS3.js';
|
|
3
3
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
4
4
|
import { ClientEvents } from 'discord.js';
|
|
5
5
|
import EventEmitter from 'node:events';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import "reflect-metadata";
|
|
3
|
+
|
|
1
4
|
// src/BakitClient.ts
|
|
2
5
|
import {
|
|
3
6
|
Client,
|
|
@@ -113,16 +116,16 @@ var SubcommandEntry = class extends BaseCommandEntry {
|
|
|
113
116
|
// src/command/Command.ts
|
|
114
117
|
var CommandAPI;
|
|
115
118
|
((CommandAPI2) => {
|
|
116
|
-
const
|
|
117
|
-
function use(
|
|
119
|
+
const rootEntries = /* @__PURE__ */ new WeakMap();
|
|
120
|
+
function use(root) {
|
|
118
121
|
return (target) => {
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
root.setTarget(target);
|
|
123
|
+
rootEntries.set(target, root);
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
126
|
CommandAPI2.use = use;
|
|
124
127
|
function getRoot(constructor) {
|
|
125
|
-
return
|
|
128
|
+
return rootEntries.get(constructor);
|
|
126
129
|
}
|
|
127
130
|
CommandAPI2.getRoot = getRoot;
|
|
128
131
|
})(CommandAPI || (CommandAPI = {}));
|
|
@@ -387,9 +390,6 @@ var CommandRegistry = class _CommandRegistry {
|
|
|
387
390
|
}
|
|
388
391
|
};
|
|
389
392
|
|
|
390
|
-
// src/command/index.ts
|
|
391
|
-
import "reflect-metadata";
|
|
392
|
-
|
|
393
393
|
// src/command/Context.ts
|
|
394
394
|
import {
|
|
395
395
|
ChatInputCommandInteraction,
|