Browse Source

#17

pull/18/head
みてるぞ 1 week ago
parent
commit
a6b676a623
2 changed files with 3 additions and 4 deletions
  1. +2
    -3
      main.py
  2. +1
    -1
      nizika_ai

+ 2
- 3
main.py View File

@@ -10,7 +10,7 @@ from typing import Any, TypedDict
import atproto # type: ignore import atproto # type: ignore
import requests import requests
from atproto import Client # type: ignore from atproto import Client # type: ignore
from atproto_client.models import AppBskyEmbedExternal, AppBskyEmbedImages # type: ignore
from atproto_client.models import AppBskyEmbedExternal, AppBskyEmbedImages, ComAtprotoRepoStrongRef # type: ignore
from atproto_client.models.app.bsky.feed.get_timeline import Response # type: ignore from atproto_client.models.app.bsky.feed.get_timeline import Response # type: ignore
from atproto_client.models.app.bsky.feed.post import ReplyRef # type: ignore from atproto_client.models.app.bsky.feed.post import ReplyRef # type: ignore
from requests.exceptions import Timeout from requests.exceptions import Timeout
@@ -102,8 +102,7 @@ async def answer (
if (not uri) or (not cid): if (not uri) or (not cid):
continue continue


sref = { 'uri': uri, 'cid': cid }
strong_ref = atproto.models.create_strong_ref (sref) # type: ignore
strong_ref = ComAtprotoRepoStrongRef.Main (uri = uri, cid = cid)
reply_ref = ReplyRef (root = strong_ref, parent = strong_ref) reply_ref = ReplyRef (root = strong_ref, parent = strong_ref)
try: try:
client.post (answer.content[:250], reply_to = reply_ref) client.post (answer.content[:250], reply_to = reply_ref)


+ 1
- 1
nizika_ai

@@ -1 +1 @@
Subproject commit 5dae2ae038e1109f3c70d853d2b7dd7542e5e88e
Subproject commit 1f75763038adccd59699274816cbc37a944c8768

Loading…
Cancel
Save