Skip to content

Commit 302106e

Browse files
authored
Merge pull request #16 from 0d9e-tech/amogus
Release to sus
2 parents d86f4c3 + 5c1420d commit 302106e

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
continue-on-error: true
1818

1919
- name: Setup Deno
20-
uses: denoland/setup-deno@v1
20+
uses: denoland/setup-deno@v2
2121

2222
- name: Run Deno lint
23-
run: deno lint
23+
run: deno check && deno lint
2424
id: lint
2525
continue-on-error: true
2626

server.deno.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function handleEvent(e: RequestEvent): Promise<Response | null> {
102102
});
103103
}
104104

105-
return new Response(videoBytes.buffer, {
105+
return new Response(videoBytes.buffer as ArrayBuffer, {
106106
headers: {
107107
"Content-Type": "video/mp4",
108108
"Access-Control-Allow-Origin": "*"
@@ -127,7 +127,7 @@ async function handleEvent(e: RequestEvent): Promise<Response | null> {
127127
});
128128
}
129129

130-
return new Response(sticekrBytes.buffer, {
130+
return new Response(sticekrBytes.buffer as ArrayBuffer, {
131131
headers: {
132132
"Content-Type": "image/webp"
133133
},

static/startup.jpg

25.2 KB
Loading

tgbot.deno.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const PRINTER_TOKEN = Deno.env.get("PRINTER_TOKEN")!;
1919

2020
export const webhookPath = "/tg-webhook";
2121

22+
const bootId = Math.random().toString(36).slice(2, 10);
23+
2224
export type RequestEvent = {
2325
request: Request;
2426
respondWith(r: Response): Promise<void>;
@@ -383,10 +385,15 @@ export async function init() {
383385
"setWebhook"
384386
);
385387

386-
await tgCall({
387-
photo: "AgACAgQAAxkBAAIHQmkk0fV6aEF7Rpz_P_DRidFVgittAALWxzEb-Kg4UXc1AknVNzxLAQADAgADeAADNgQ",
388-
chat_id: MAIN_CHAT_ID,
389-
}, "sendPhoto");
388+
setTimeout(async () => {
389+
await tgCall(
390+
{
391+
photo: `https://${DOMAIN}/startup.jpg?q=${bootId}`,
392+
chat_id: MAIN_CHAT_ID,
393+
},
394+
"sendPhoto"
395+
);
396+
}, 2000);
390397

391398
Deno.cron("tuuuuuuuuuu", "0 11 * * 4#1", () => {
392399
tgCall({

0 commit comments

Comments
 (0)