New issue
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
on message只获取了一半的内容,截断了,怎么解决呢? #2667
Comments
To address the issue of your messages being truncated when logged, you can modify the Here's a quick guide to modify the override toString () {
if (!this.payload) {
return this.constructor.name
}
let talker
try {
talker = this.talker()
} catch (e) {
talker = (e as Error).message
}
const msgStrList = [
'Message',
`#${PUPPET.types.Message[this.type()]}`,
'[',
'🗣',
talker,
this.room()
? '@👥' + this.room()
: '',
']',
]
if (this.type() === PUPPET.types.Message.Text
|| this.type() === PUPPET.types.Message.Unknown
) {
// Remove the substring method to prevent truncation
msgStrList.push(`\t${this.text()}`)
} else {
log.silly('Message', 'toString() for message type: %s(%s)', PUPPET.types.Message[this.type()], this.type())
}
return msgStrList.join('')
} This modification removes the substring call that was truncating the text. For messages that are not of type Text or Unknown, ensure your logging captures and stores the full content or references needed to retrieve the content later. By implementing this change, you should be able to log the entire content of messages without encountering truncation issues. Sources
|
实际发送的是很长的:
🏡《唐顿庄园》全6季超清视频¥0領,学习英语口语必备利器……
🌈6季总提名60次,获奖16次
🌈英伦贵族餐桌文化、交际礼仪,纤毫毕现
🌈人物塑造之精良,被誉为英国版“红楼梦”
👉认領入口:https://dwz.cn/kz1pEy1J?IZiLZ
👉认領入口:https://dwz.cn/kz1pEy1J?IZiLZ
(¯﹁¯)✧时间会通知你改变一切罢了~@_@
The text was updated successfully, but these errors were encountered: