|
|
@@ -87,15 +87,18 @@ def main () -> None: |
|
|
|
has_got_snack_time = False |
|
|
|
|
|
|
|
if now.hour == 15 and not has_got_snack_time: |
|
|
|
with open ('./assets/snack-time.jpg', 'rb') as f: |
|
|
|
image = models.AppBskyEmbedImages.Image ( |
|
|
|
alt = 'おやつタイムだ!!!!', |
|
|
|
image = client.com.atproto.repo.upload_blob (f).blob) |
|
|
|
|
|
|
|
client.send_post (Talk.main ('おやつタイムだ!!!!'), |
|
|
|
embed = models.app.bsky.embed.images.Main ( |
|
|
|
images = [image])) |
|
|
|
last_posted_at = now |
|
|
|
try: |
|
|
|
with open ('./assets/snack-time.jpg', 'rb') as f: |
|
|
|
image = models.AppBskyEmbedImages.Image ( |
|
|
|
alt = 'おやつタイムだ!!!!', |
|
|
|
image = client.com.atproto.repo.upload_blob (f).blob) |
|
|
|
|
|
|
|
client.send_post (Talk.main ('おやつタイムだ!!!!'), |
|
|
|
embed = models.app.bsky.embed.images.Main ( |
|
|
|
images = [image])) |
|
|
|
last_posted_at = now |
|
|
|
except Exception: |
|
|
|
pass |
|
|
|
|
|
|
|
has_got_snack_time = True |
|
|
|
|
|
|
|