Skip to content

Instantly share code, notes, and snippets.

View darvesh's full-sized avatar
🏠

Darvesh darvesh

🏠
View GitHub Profile
import { Bot, Context } from "https://deno.land/x/grammy@v1.8.0/mod.ts";
import * as grammyRatelimiter from "https://raw.githubusercontent.com/grammyjs/rateLimiter/fix-wrong-type/src/rateLimiter.ts";
const token = Deno.args[0];
const bot = new Bot(token);
const MASTER = 272286804;
const filterPrivate = (ctx: Context) => ctx.chat?.type === "private";
@darvesh
darvesh / tsrelease.ts
Last active March 27, 2022 05:07
A Telegram bot that sends notification when there is new blog post on https://devblogs.microsoft.com/typescript/feed/. You can also list blogs inline and send.
import { Bot } from "https://deno.land/x/grammy@v1.7.0/mod.ts";
import { parseFeed, Feed } from "https://deno.land/x/rss@0.5.5/mod.ts";
const INTERVAL = 60 * 10 * 1000;
const RECIPIENT = -1001335202320;
const TOKEN = Deno.args[0];
if (!TOKEN) throw new Error("Please provide a bot token");
const bot = new Bot(TOKEN);
<html lang="en"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Temporary Pastebin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ipfs/0.54.4/index.min.js" integrity="sha512-6GHE5kFKM1y+tmjSWrTCF13qsIqV9hDYYwrZ9iu/7wnoY4qvq/u7qSVKN4iDk0xeI7pLv6h3nBRp64aIYya8KA==" crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script>
{
"swagger": "2.0",
"info": {
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"version": "1.0.5",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io"
},
@darvesh
darvesh / webdev_online_resources.md
Created August 12, 2018 06:58 — forked from b1n4ry9h0S7/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)