リンク・カード追加
このコミットが含まれているのは:
@@ -82,7 +82,7 @@ def main (
|
||||
'content':
|
||||
record['text']},
|
||||
reversed (records[1:]))])
|
||||
client.send_post (answer,
|
||||
client.post (answer,
|
||||
reply_to = models.AppBskyFeedPost.ReplyRef (
|
||||
parent = records[0]['strong_ref'],
|
||||
root = records[-1]['strong_ref']))
|
||||
@@ -91,15 +91,20 @@ def main (
|
||||
if e['contentId'] not in watched_videos]:
|
||||
watched_videos += [datum['contentId']]
|
||||
|
||||
client.send_post (Talk.main (f"""
|
||||
embed_external = models.AppBskyEmbedExternal.Main (
|
||||
external = models.AppBskyEmbedExternal.External (
|
||||
title = datum['title'],
|
||||
description = datum['description'],
|
||||
uri = f"https://www.nicovideo.jp/watch/{ datum['contentId'] }"))
|
||||
client.post (Talk.main (f"""
|
||||
ニコニコに『{ datum['title'] }』という動画がアップされました。
|
||||
つけられたタグは「{ '」、「'.join (datum['tags']) }」です。
|
||||
概要には次のように書かれています:
|
||||
```html
|
||||
{ datum['description'] }
|
||||
```
|
||||
このことについて、みんなに告知するとともに、ニジカちゃんの感想を教えてください。
|
||||
"""))
|
||||
このことについて、みんなに告知するとともに、ニジカちゃんの感想を教えてください。 """),
|
||||
embed = embed_external)
|
||||
|
||||
if now.hour == 14 and has_got_snack_time:
|
||||
has_got_snack_time = False
|
||||
@@ -121,7 +126,7 @@ def main (
|
||||
'日本語のテキストが表示されている。'),
|
||||
image = client.com.atproto.repo.upload_blob (f).blob)
|
||||
|
||||
client.send_post (Talk.main ('おやつタイムだ!!!!'),
|
||||
client.post (Talk.main ('おやつタイムだ!!!!'),
|
||||
embed = models.app.bsky.embed.images.Main (
|
||||
images = [image]))
|
||||
last_posted_at = now
|
||||
@@ -131,7 +136,7 @@ def main (
|
||||
has_got_snack_time = True
|
||||
|
||||
if now - last_posted_at >= timedelta (hours = 6):
|
||||
client.send_post (Talk.main ('今どうしてる?'))
|
||||
client.post (Talk.main ('今どうしてる?'))
|
||||
last_posted_at = now
|
||||
|
||||
time.sleep (60)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする