mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
fix post to text
This commit is contained in:
parent
c41a40faa7
commit
0fae891def
@ -12,3 +12,6 @@
|
||||
- 将“来源”移动到文末
|
||||
- 使用组合来构建新的platform,新增状态改变类型订阅
|
||||
|
||||
## [0.3.1] -
|
||||
- 修复不发送来源
|
||||
|
||||
|
@ -103,6 +103,7 @@ class Post:
|
||||
text += ' {}'.format(self.target_name)
|
||||
if self.text:
|
||||
text += ' \n{}'.format(self.text if len(self.text) < 500 else self.text[:500] + '...')
|
||||
text += '来源: {}'.format(self.target_type)
|
||||
if self._use_pic():
|
||||
msgs.append(await parse_text(text))
|
||||
if not self.target_type == 'rss' and self.url:
|
||||
@ -111,7 +112,6 @@ class Post:
|
||||
if self.url:
|
||||
text += ' \n详情: {}'.format(self.url)
|
||||
msgs.append(text)
|
||||
text += '来源: {}'.format(self.target_type)
|
||||
for pic in self.pics:
|
||||
msgs.append("[CQ:image,file={url}]".format(url=pic))
|
||||
if self.compress:
|
||||
|
Loading…
x
Reference in New Issue
Block a user