fanbox 显示金额

This commit is contained in:
xtaodada 2023-01-12 23:48:08 +08:00
parent 57d12e85ef
commit 622c84ab8b
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 5 additions and 3 deletions

View File

@ -90,7 +90,8 @@ async def parse_fanbox_post(url: str, message: Message):
if post.coverImageUrl: if post.coverImageUrl:
group = message.chat.type == ChatType.SUPERGROUP group = message.chat.type == ChatType.SUPERGROUP
await bot.send_photo( await bot.send_photo(
post.coverImageUrl, chat_id=message.chat.id,
photo=post.coverImageUrl,
caption=post.text, caption=post.text,
parse_mode=ParseMode.HTML, parse_mode=ParseMode.HTML,
reply_markup=await gen_post_button(post), reply_markup=await gen_post_button(post),
@ -118,7 +119,8 @@ async def parse_fanbox_user(url: str, message: Message) -> None:
if user.coverImageUrl: if user.coverImageUrl:
group = message.chat.type == ChatType.SUPERGROUP group = message.chat.type == ChatType.SUPERGROUP
await bot.send_photo( await bot.send_photo(
user.coverImageUrl, chat_id=message.chat.id,
photo=user.coverImageUrl,
caption=user.text, caption=user.text,
parse_mode=ParseMode.HTML, parse_mode=ParseMode.HTML,
reply_markup=await gen_user_button(user), reply_markup=await gen_user_button(user),

View File

@ -79,5 +79,5 @@ class Post(BaseModel):
f"<b>Fanbox Post Info</b>\n\n" f"<b>Fanbox Post Info</b>\n\n"
f"<code>{self.excerpt.strip()}</code>\n\n" f"<code>{self.excerpt.strip()}</code>\n\n"
f'<a href="{self.user_url}">{self.user.name}</a> 发表于 {self.create_time}\n' f'<a href="{self.user_url}">{self.user.name}</a> 发表于 {self.create_time}\n'
f"❤️ {self.likeCount}" f"❤️ {self.likeCount}{self.feeRequired} 日元"
) )