@open-discord-bots/framework 0.3.12 → 0.3.13
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/api/main.js
CHANGED
|
@@ -44,7 +44,7 @@ export class ODMain {
|
|
|
44
44
|
constructor(managers, project) {
|
|
45
45
|
this.project = project;
|
|
46
46
|
this.versions = managers.versions;
|
|
47
|
-
this.versions.add(ODVersion.fromString("opendiscord:api", "v0.3.
|
|
47
|
+
this.versions.add(ODVersion.fromString("opendiscord:api", "v0.3.13"));
|
|
48
48
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus", "v2.0.0"));
|
|
49
49
|
this.debugfile = managers.debugfile;
|
|
50
50
|
this.console = managers.console;
|
|
@@ -250,7 +250,7 @@ export declare class ODMessageComponentModifier<Origin extends string, Params, W
|
|
|
250
250
|
workers: ODWorkerManager<ODMessageInstance | ODComponentFactoryInstance<ODMessageComponent>, Origin, Params, WorkerIds>;
|
|
251
251
|
constructor(id: ODValidId, callback?: ODWorkerCallback<ODMessageInstance | ODComponentFactoryInstance<ODMessageComponent>, Origin, Params>, priority?: number, callbackId?: ODValidId);
|
|
252
252
|
/**Modify an `ODMessage` or `ODComponentFactory` with these workers. A copy will be returned and the original is preserved. */
|
|
253
|
-
modify<Message extends ODMessage<
|
|
253
|
+
modify<Message extends ODMessage<any, any, any> | ODComponentFactory<ODMessageComponent, any, any, any>>(message: Message, origin: Origin, params: Params): Message;
|
|
254
254
|
}
|
|
255
255
|
/**## ODMessageComponentData `type`
|
|
256
256
|
* The configurable settings/options for the `ODMessageComponent`.
|
|
@@ -332,11 +332,11 @@ export class ODMessageComponentModifier extends ODManagerData {
|
|
|
332
332
|
this.workers.add(new ODWorker(callbackId ? callbackId : id, priority ?? 0, callback));
|
|
333
333
|
}
|
|
334
334
|
/**Modify an `ODMessage` or `ODComponentFactory` with these workers. A copy will be returned and the original is preserved. */
|
|
335
|
-
modify(message) {
|
|
335
|
+
modify(message, origin, params) {
|
|
336
336
|
const newMsg = message.duplicate(message.id.value + "-VERIFYBAR");
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
337
|
+
newMsg.workers.add(new ODWorker("opendiscord:VERIFYBAR", 1000, async (msgInstance, msgParams, msgOrigin, msgCancel) => {
|
|
338
|
+
await this.workers.executeWorkers(msgInstance, origin, params);
|
|
339
|
+
}));
|
|
340
340
|
return newMsg;
|
|
341
341
|
}
|
|
342
342
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-discord-bots/framework",
|
|
3
3
|
"author": "DJj123dj",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.13",
|
|
5
5
|
"description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
package/src/api/main.ts
CHANGED
|
@@ -154,7 +154,7 @@ export abstract class ODMain implements ODMainManagers {
|
|
|
154
154
|
constructor(managers:ODMainManagers,project:ODProjectType){
|
|
155
155
|
this.project = project
|
|
156
156
|
this.versions = managers.versions
|
|
157
|
-
this.versions.add(ODVersion.fromString("opendiscord:api","v0.3.
|
|
157
|
+
this.versions.add(ODVersion.fromString("opendiscord:api","v0.3.13"))
|
|
158
158
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus","v2.0.0"))
|
|
159
159
|
|
|
160
160
|
this.debugfile = managers.debugfile
|
|
@@ -444,11 +444,11 @@ export class ODMessageComponentModifier<Origin extends string,Params,WorkerIds e
|
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
/**Modify an `ODMessage` or `ODComponentFactory` with these workers. A copy will be returned and the original is preserved. */
|
|
447
|
-
modify<Message extends ODMessage<
|
|
447
|
+
modify<Message extends ODMessage<any,any,any>|ODComponentFactory<ODMessageComponent,any,any,any>>(message:Message,origin:Origin,params:Params): Message {
|
|
448
448
|
const newMsg = message.duplicate(message.id.value+"-VERIFYBAR") as Message
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
449
|
+
newMsg.workers.add(new ODWorker<any,any,any>("opendiscord:VERIFYBAR",1000,async (msgInstance,msgParams,msgOrigin,msgCancel) => {
|
|
450
|
+
await this.workers.executeWorkers(msgInstance,origin,params)
|
|
451
|
+
}))
|
|
452
452
|
return newMsg
|
|
453
453
|
}
|
|
454
454
|
}
|