getting-started icon indicating copy to clipboard operation
getting-started copied to clipboard

为什么不能发送微信语音

Open zouhuigang opened this issue 2 years ago • 5 comments

const audioUrl = "https://afu-1255830993.cos.ap-shanghai.myqcloud.com/20230214183133.silk" const fileBox = FileBox.fromUrl(audioUrl); msg.say(fileBox);

zouhuigang avatar Feb 14 '23 10:02 zouhuigang

image

zouhuigang avatar Feb 14 '23 10:02 zouhuigang

名称要单独定义的

zhao-jun avatar Mar 27 '23 09:03 zhao-jun

import {FileBox, ScanStatus, WechatyBuilder, log } from 'wechaty' ^^^^^^^ SyntaxError: The requested module 'wechaty' does not provide an export named 'FileBox' at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21) at async ModuleJob.run (node:internal/modules/esm/module_job:189:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12)

我引入FileBox报错

版本: $ npm --version 9.6.0

$ node --version v16.17.0

求赐教

sunboye avatar Apr 11 '23 15:04 sunboye

FileBox引入 import { FileBox } from 'file-box'

zhao-jun avatar Apr 12 '23 03:04 zhao-jun

好的,谢谢FileBox确实有用

如果引入Message报错,有办法没

import {Message, ScanStatus, WechatyBuilder, log } from 'wechaty' ^^^^^^^ SyntaxError: The requested module 'wechaty' does not provide an export named 'Message'

sunboye avatar Apr 13 '23 06:04 sunboye