This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handler(req: Request): Response { | |
return new Response(`Hello, ${req.url}`); | |
} | |
Deno.serve({ | |
port: 0 | |
}, handler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetchify from "https://deno.land/x/fetchify@0.2.8/mod.ts"; | |
export class TelegramMailer { | |
private tgApi; | |
private queue: Deno.Kv = undefined as unknown as Deno.Kv; | |
constructor(token: string) { | |
this.tgApi = fetchify.create({ | |
baseURL: `https://api.telegram.org/bot${token}/`, | |
limiter: { |