Advertisement
mspotilas

Nyyssii

Jul 14th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //lisää RichText
  2. const { BskyAgent, AppBskyFeedPost, RichText } = require("@atproto/api");
  3.  
  4. ...
  5.  
  6. // funktion alussa muutoksia
  7. async function post(agent, item) {
  8.   const rt = new RichText({ text: item.title });
  9.   await rt.detectFacets(agent);    
  10.   let post = {
  11.     $type: "app.bsky.feed.post",
  12.     text: rt.text,
  13.     facets: rt.facets,
  14.     createdAt: new Date().toISOString(),
  15.   };
  16.   const dom = ...
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement