微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

从转储为 dict 的消息构建`telethon.tl.custom.message.Message`

如何解决从转储为 dict 的消息构建`telethon.tl.custom.message.Message`

telethon.tl.custom.message.Message 支持 to_dict() 函数,当我使用该消息字典中的相同 Messageid 字段创建新的 message 实例时,我能够创建一个 Message 对象,但在尝试将消息发送到频道时,我收到此错误 TypeError: 'Message' object is not iterable

    message = add_surrogate(message)
  File "/Users/barha/.pyenv/versions/3.9.4/lib/python3.9/site-packages/telethon/helpers.py",line 39,in add_surrogate
    return ''.join(
TypeError: 'Message' object is not iterable

有没有一种正式的方法可以从转储的字典中构造 Message?关于自定义 Message 错误的发送消息的任何提示

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。