blueskyAlertmain.tsx3 matches
1import { AtpAgent } from "npm:@atproto/api@0.13.15";
2import pMap from "npm:p-map";
356const agent = new AtpAgent({
7service: "https://public.api.bsky.app/",
8});
937if (!response.ok) {
38throw new Error(
39`Slack API error: ${response.status} ${response.statusText}`,
40);
41}
Discord-to-LinearREADME.md3 matches
33(right-click channel โ Copy ID)
34- Example: `1327384540187983926,1327384540187983927`
35- `LINEAR_API_KEY`: Your Linear API key
36- For Linear Teams accounts, you need API key permissions from a workspace
37admin.
38- Members can create personal API keys from Settings โ Account โ Security &
39Access.
40- `LINEAR_TEAM_ID`: Your Linear team UUID, this is NOT the 3 letter
linearStandup2main.tsx9 matches
5758export async function exec(interval: Interval) {
59const apiKey = Deno.env.get("LINEAR_API_KEY");
60if (!apiKey) {
61console.error("LINEAR_API_KEY not found in environment variables");
62Deno.exit(1);
63}
65const { startDate, endDate } = getYesterdayDateRange();
6667const response = await fetch("https://api.linear.app/graphql", {
68method: "POST",
69headers: {
70"Content-Type": "application/json",
71Authorization: apiKey,
72},
73body: JSON.stringify({
8081if (data.errors) {
82console.error("Error fetching data from Linear API:", data.errors);
83Deno.exit(1);
84}
94}
9596const historyResponse = await fetch("https://api.linear.app/graphql", {
97method: "POST",
98headers: {
99"Content-Type": "application/json",
100Authorization: apiKey,
101},
102body: JSON.stringify({
190}
191192const slackResponse = await fetch("https://slack.com/api/chat.postMessage", {
193method: "POST",
194headers: {
Discord-to-Linearmain.tsx3 matches
1import { blob } from "https://esm.town/v/std/blob";
2import { CONFIG } from "./backend/config.tsx";
3import { DiscordAPI } from "./backend/discord.tsx";
4import { LinearSDK } from "./backend/linear.tsx";
52425// Initialize services
26const discord = new DiscordAPI();
27const linear = new LinearSDK();
2845*/
46async function processChannelReactions(
47discord: DiscordAPI,
48linear: LinearSDK,
49serverId: string,
subcurrentShuffle2index.ts2 matches
58}
5960// API endpoint to get a random post
61app.get("/api/random-post", async (c) => {
62try {
63// First, let's try to find the RSS feed URL
subcurrentShuffle2README.md1 match
5## Structure
67- `backend/` - Hono API server
8- `index.ts` - Main entry point with RSS fetching and serving
9- `frontend/` - React UI
asurareleasesbotsender.ts11 matches
260}
261262/*โโโโโโโโโโโโโโโโโโโโ 8 โธ Scraping Logic โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ*/
263function buildChapterObject(
264$: cheerio.CheerioAPI,
265chapterLinkElement: cheerio.Element,
266seriesTitle: string,
301302async function scrapeMainPageForChapterEvents(): Promise<ChapterEventInfo[]> {
303log("Scraping main page for chapter events:", BASE_URL);
304const chapterEvents: ChapterEventInfo[] = [];
305try {
439seriesPageUrl: string,
440): Promise<Pick<ChapterEventInfo, "definitiveSeriesTitle" | "definitiveSeriesImage" | "synopsis">> {
441log("Scraping series page for details:", seriesPageUrl);
442try {
443const { data } = await httpClient.get(seriesPageUrl, { responseType: "text" });
547log(`=== Multi-Event Announcer (Ch1, Season Start/End) to ${PRIMARY_CHAT_ID} then ${SECONDARY_CHAT_ID} ===`);
548try {
549await bot.api.getMe();
550log("Bot token validated.");
551}
650log(`Announcing to PRIMARY (${PRIMARY_CHAT_ID}): ${nameOfManhwa} - Event: ${event.eventType}`);
651if (imageUrl && (event.eventType === EventType.NEW_SERIES || event.eventType === EventType.SEASON_START)) {
652await bot.api.sendPhoto(PRIMARY_CHAT_ID, imageUrl, { caption: messageContent, parse_mode: "HTML" });
653} else {
654await bot.api.sendMessage(PRIMARY_CHAT_ID, messageContent, {
655parse_mode: "HTML",
656disable_web_page_preview: false,
664if (BOT_OWNER_ID) {
665try {
666await bot.api.sendMessage(
667BOT_OWNER_ID,
668`PRIMARY SEND FAIL: ${event.eventType} for ${nameOfManhwa}.\nError: ${e.message.substring(0, 300)}`,
679log(`Reposting to SECONDARY (${SECONDARY_CHAT_ID}): ${nameOfManhwa} - Event: ${event.eventType}`);
680if (imageUrl && (event.eventType === EventType.NEW_SERIES || event.eventType === EventType.SEASON_START)) {
681await bot.api.sendPhoto(SECONDARY_CHAT_ID, imageUrl, { caption: messageContent, parse_mode: "HTML" });
682} else {
683await bot.api.sendMessage(SECONDARY_CHAT_ID, messageContent, {
684parse_mode: "HTML",
685disable_web_page_preview: false,
691if (BOT_OWNER_ID) {
692try {
693await bot.api.sendMessage(
694BOT_OWNER_ID,
695`SECONDARY REPOST FAIL: ${event.eventType} for ${nameOfManhwa} (Primary was OK).\nError: ${
Discord-to-Lineardiscord.tsx5 matches
1import { CONFIG } from "./config.tsx";
23export class DiscordAPI {
4// Fetch from the Discord API
5private async discordFetch(endpoint: string): Promise<any> {
6console.log(Deno.env.get("DISCORD_BOT_TOKEN"));
7console.log(`https://discord.com/api/v10${endpoint}`);
8const response = await fetch(`https://discord.com/api/v10${endpoint}`, {
9headers: { "Authorization": `Bot ${Deno.env.get("DISCORD_BOT_TOKEN")}` },
10});
11console.log(response.status);
12if (!response.ok) {
13throw new Error(`Discord API error: ${response.status}`);
14}
15
cschicklikeCurrentTrack.tsx3 matches
56// Get new access token
7const tokenRes = await fetch("https://accounts.spotify.com/api/token", {
8method: "POST",
9headers: {
2122// Get currently playing song
23const currentRes = await fetch("https://api.spotify.com/v1/me/player/currently-playing", {
24headers: {
25Authorization: `Bearer ${access_token}`,
3637// Like the song
38const likeRes = await fetch(`https://api.spotify.com/v1/me/tracks`, {
39method: "PUT",
40headers: {
38Enhanced logging system for better debugging
39Fixed occasional 500 error with the /sessions endpoint
40UI docker image now accepts dynamic API URLs for custom deploys
41Fixes to re-render bugs that were causing some state update delays
42Fixes requests ordering from FE to preload data for a snappier UI
181});
182183console.log(`GitHub API response status: ${response.status}`);
184console.log(`Raw commit count: ${response.data.length}`);
185186return response.data;
187} catch (error) {
188console.error("GitHub API Error:", error);
189throw error;
190}