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.
Files changed (2) hide show
  1. package/lib/index.js +3 -4
  2. 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": base64Data,
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.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 (0, import_koishi.h)("audio", { src: `base64://${cassie["data"]}` });
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-node-async-bot-all",
3
3
  "description": "NodeAsync Bot插件(自用)",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [