koishi-plugin-node-async-bot-all 2.0.0 → 2.0.1
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/lib/index.js +3 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -411,11 +411,10 @@ async function getCASSIE(ctx, session, name2) {
|
|
|
411
411
|
log.info("Sent: .failed");
|
|
412
412
|
log.info(msg);
|
|
413
413
|
} else {
|
|
414
|
-
const base64Data = bufferToSend.toString("base64");
|
|
415
414
|
log.info("Sent: A audio file.");
|
|
416
415
|
msg = {
|
|
417
416
|
"time": time,
|
|
418
|
-
"data":
|
|
417
|
+
"data": bufferToSend,
|
|
419
418
|
"success": 0
|
|
420
419
|
};
|
|
421
420
|
}
|
|
@@ -443,7 +442,7 @@ async function getCASSIE(ctx, session, name2) {
|
|
|
443
442
|
__name(getCASSIE, "getCASSIE");
|
|
444
443
|
|
|
445
444
|
// package.json
|
|
446
|
-
var version = "2.0.
|
|
445
|
+
var version = "2.0.1";
|
|
447
446
|
|
|
448
447
|
// src/index.ts
|
|
449
448
|
var inject = ["silk", "database"];
|
|
@@ -519,7 +518,7 @@ function apply(ctx) {
|
|
|
519
518
|
ctx.command("cassie [名称:string]").action(async ({ session }, name2) => {
|
|
520
519
|
const cassie = await getCASSIE(ctx, session, name2);
|
|
521
520
|
if (cassie["success"] == 0) {
|
|
522
|
-
return
|
|
521
|
+
return import_koishi.h.audio(cassie["data"], "audio/silk");
|
|
523
522
|
} else if (cassie["success"] == 1) {
|
|
524
523
|
return [`${session.text(".msg", cassie)}`];
|
|
525
524
|
} else if (cassie["success"] == 2) {
|