おやつタイム失敗時にはエラーを握り潰すやぅに

このコミットが含まれているのは:
2024-09-05 01:22:59 +09:00
コミット 0e6fe12510
+3
ファイルの表示
@@ -87,6 +87,7 @@ def main () -> None:
has_got_snack_time = False has_got_snack_time = False
if now.hour == 15 and not has_got_snack_time: if now.hour == 15 and not has_got_snack_time:
try:
with open ('./assets/snack-time.jpg', 'rb') as f: with open ('./assets/snack-time.jpg', 'rb') as f:
image = models.AppBskyEmbedImages.Image ( image = models.AppBskyEmbedImages.Image (
alt = 'おやつタイムだ!!!!', alt = 'おやつタイムだ!!!!',
@@ -96,6 +97,8 @@ def main () -> None:
embed = models.app.bsky.embed.images.Main ( embed = models.app.bsky.embed.images.Main (
images = [image])) images = [image]))
last_posted_at = now last_posted_at = now
except Exception:
pass
has_got_snack_time = True has_got_snack_time = True