We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unofficial emoji message to fileBox error
In the file puppet-wechat4u.ts around line 675 under case PUPPET.types.Message.Emoticon, here is my solution:
puppet-wechat4u.ts
case PUPPET.types.Message.Emoticon
case PUPPET.types.Message.Emoticon: { /** * Emoji message */ const msg = await this.wechat4u.getMsgImg(rawPayload.MsgId) const fileExt = await getExtensionFromBuffer(msg.data) const ext = fileExt?.ext || 'jpg' filename = `${rawPayload.MsgId}.${ext}` const file = FileBox.fromBuffer( msg.data, filename, ) return file }
"dependencies": { "file-type": "^16.5.4" }, import { fromBuffer } from "file-type"; export async function getExtensionFromBuffer(buffer: Buffer) { return await fromBuffer(buffer) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Unofficial emoji message to fileBox error
In the file
puppet-wechat4u.ts
around line 675 undercase PUPPET.types.Message.Emoticon
, here is my solution:The text was updated successfully, but these errors were encountered: