Skip to content

Instantly share code, notes, and snippets.

View dcdunkan's full-sized avatar

Dunkan dcdunkan

View GitHub Profile
@dcdunkan
dcdunkan / slideshare_bot.ts
Last active March 27, 2023 10:07
Slideshare downloader
import { Bot, InputFile } from "https://deno.land/x/[email protected]/mod.ts";
import { DOMParser } from "https://deno.land/x/[email protected]/deno-dom-wasm.ts";
import { StatusMessage } from "https://gist.githubusercontent.com/dcdunkan/235859eac749d36f4df7c00b99fbbc8f/raw/status.ts";
const bot = new Bot(Deno.env.get("BOT_TOKEN")!);
bot.command("start", async (ctx) => await ctx.reply("yeah!"));
bot.on("message:text").on("::url", async (ctx) => {
const url = ctx.message.text;
@dcdunkan
dcdunkan / example.ts
Last active February 3, 2022 13:07
Telegraph API wrapper different parse mode examples
/*
* This is just for demonstrational purposes. A minimal one, haven't used so many
* available tags, markdown syntaxes. See the library and documentation here:
* https://github.com/dcdunkan/telegraph.
*/
import { Telegraph, parse } from "https://deno.land/x/telegraph/mod.ts";
const tph = new Telegraph({
// SANDBOX access token from Official API Docs: https://telegra.ph/api