Schedule posts to Bluesky with Cloudflare workers. skyscheduler.work
cf tool bsky-tool cloudflare bluesky schedule bsky service social-media cloudflare-workers

More frameworking

less heavy conscious

+3 -3
+1 -1
src/utils/db/userinfo.ts
··· 28 28 .from(users) 29 29 .where(eq(users.id, userid)) 30 30 .limit(1).all(); 31 - return createLoginCredsObj(response[0] || null); 31 + return createLoginCredsObj(env, response[0] || null); 32 32 }; 33 33 34 34 export const getUsernameForUserId = async (env: Bindings, userId: string): Promise<string|null> => {
+2 -2
src/utils/helpers.ts
··· 1 1 import { startOfHour, subDays } from "date-fns"; 2 2 import has from "just-has"; 3 3 import isEmpty from "just-is-empty"; 4 - import { BskyAPILoginCreds, Post, Repost, RepostInfo } from "../types.d"; 4 + import { Bindings, BskyAPILoginCreds, Post, Repost, RepostInfo } from "../types.d"; 5 5 6 6 export function createPostObject(data: any) { 7 7 const postData: Post = (new Object() as Post); ··· 65 65 return repostObj; 66 66 } 67 67 68 - export function createLoginCredsObj(data: any) { 68 + export function createLoginCredsObj(env: Bindings, data: any) { 69 69 const loginCreds: BskyAPILoginCreds = (new Object() as BskyAPILoginCreds); 70 70 if (isEmpty(data)) { 71 71 loginCreds.password = loginCreds.username = loginCreds.pds = "";