Skip to content

Instantly share code, notes, and snippets.

View Kycermann's full-sized avatar
🎯
Coding

Mieszko Kycermann Kycermann

🎯
Coding
View GitHub Profile

Authenticate

1. Link to /auth/discord

Redirects the client to the Discord OAuth flow.

This will redirect the user to /?session=

2. ?session=<SESSION>

@Kycermann
Kycermann / storybro.js
Created June 14, 2023 17:45
Storybro - Deno KV Hackathon Entry
import { serve, json, validateRequest } from "https://deno.land/x/sift@0.6.0/mod.ts";
import { InteractionResponseTypes, InteractionTypes, createBot } from "https://deno.land/x/discordeno@18.0.1/mod.ts";
import nacl from "https://cdn.skypack.dev/tweetnacl@v1.0.3?dts";
import { withSafeAtomics } from "https://deno.land/x/oktrue@1.1.0/mod.ts";
// Try it out here: https://discord.gg/5nBCAa45
const kv = withSafeAtomics(await Deno.openKv());
serve({