File tree Expand file tree Collapse file tree 4 files changed +15
-8
lines changed
Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 } ,
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ const PRINTER_TOKEN = Deno.env.get("PRINTER_TOKEN")!;
1919
2020export const webhookPath = "/tg-webhook" ;
2121
22+ const bootId = Math . random ( ) . toString ( 36 ) . slice ( 2 , 10 ) ;
23+
2224export 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 ( {
You can’t perform that action at this time.
0 commit comments