GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - discohook/discohook: Send webhook messages from your browser (and so much more)

BranchesTags
Open more actions menu

Latest commit

 

History

2,493 Commits
2,493 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
.yarn/releases
.yarn/releases
 
 
drizzle
drizzle
 
 
packages
packages
 
 
.gitignore
.gitignore
 
 
.yarnrc.yml
.yarnrc.yml
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
biome.json
biome.json
 
 
bun.lockb
bun.lockb
 
 
drizzle.config.ts
drizzle.config.ts
 
 
lerna.json
lerna.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Discohook

Simple, free, and highly versatile message designer for Discord webhooks.

Feature comparison

This is a complete rewrite of the original Discohook project by @maddysrc, now under new ownership. Read the full changelog.

Free?

Discohook is free, but you are encouraged to donate and get extra perks!

Meta

This monorepo comes in a few main parts:

  • site - The Discohook website
  • bot - Handles Discord interactions & proxied gateway events
  • bot-ws - Proxies gateway events to bot
  • bouncer - Enables extended flow execution time for bot
  • magic-backup-importer - Hosted on a domain where users may have local backups stored (site redirects here and vice versa)
  • link - Hosted on a subdomain or shorter domain, used for redirecting to /link/...

Along with some shared packages:

  • store - Database & KV utilities
    • Upgrading? Make sure to check out this package's README for database migration notes.

Attribution

Translations

Thanks to Language(s) Progress
mew610 Arabic
anonymous Portuguese (Brazil)
mumu-oo Chinese (Traditional)
dustytheonly, Kamfkeks German
Mathew Rozhdestvensky Russian
yaraej_ Spanish
ilprofilodineko Italian
maddymeows Dutch

... and more! (site translations must be at least 50% complete to be shown in this table)

Original Project

Big thanks to @maddysrc and @crawron for creating the original Discohook project in 2019 and later working with me to gracefully transfer ownership after 5 years.

Development

Prerequisites: bindings

Hyperdrive (PostgreSQL)

The DATABASE_URL secret should be defined when developing as a connection string for a local PostgreSQL database. The bot and site packages will fill env.HYPERDRIVE such that it can be used in the getDb utility.

In production, this variable is not used. Instead, provide a connection string directly to the Hyperdrive instance associated with the worker in wrangler.toml.

KV (Redis)

This project started out using Cloudflare KV, but it was exorbitantly expensive, so it now uses a self-hosted instance of Valkey behind Webdis. In the bot and site packages, you will need to define a REDIS_URL secret that describes the credentials to your Webdis instance in a standard redis:// URI format. See Webdis's README on configuring access control.

env.KV is made available as a RedisKV instance, which is a custom class designed to mimic the behavior of KVNamespace.

Contributing

Before submitting your pull request, please remember to run npx biome check . to check for errors, then yarn fix to format. This repository uses Biome, not ESLint/Prettier. You may also want to install the Biome extension for your editor.

As far as style preferences not covered by the Biome configuration:

  • Use n += 1 rather than n++
  • Prefer chaining schemas (z.string().optional()) over nesting (z.optional(z.string()))
  • Prefer Drizzle callbacks where possible ((table, { eq }) => eq(table.id, id)) over importing individual tables and functions

Bot

Run yarn dev:bot to start a miniflare server for the "primary" portion of the bot. To expose the local server to the internet so that Discord can request it, use the tunnel script in the bot directory (requires cloudflared to be installed). Once you're done with that, copy your tunneled URL to your Discord application's "Interactions Endpoint URL" field.

interactions-endpoint

If you would also like to work on gateway event processing (the "response" logic for which is contained in the primary portion), you will need to run yarn bot-ws to start an instance of the gateway-connected bot. Be sure to define the required environment variables as described in its README. While testing, use the Ngrok URL from above as your WORKER_ORIGIN so that you can use the Ngrok web interface to replay events.

Site

Run yarn dev:site to start a miniflare server for the site.

If you want to develop magic-backup-importer, also run yarn dev:backups after setting up its environment. This will be hosted on http://localhost:8789 by default. To save a backup to the local database, uncomment the execution of the saveBackup() method in the index route's useEffect callback.

Deployment

This project relies on Durable Objects for many core features, which is a product exclusive to accounts on the Workers Paid plan. If you do not want to subscribe to Workers Paid, you will have to remove these features in your fork.

Or, if you don't want to do either of those, consider joining the support server and letting me know what you want to see in the main instance.

About

Send webhook messages from your browser (and so much more)

discohook.app

Topics

cloudflare-workersdiscorddiscord-apidiscord-webhookdiscordjsdrizzle-ormdurable-objectsembedspostgresqltypescriptwebhooks

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

190 stars

Watchers

4 watching

Forks

44 forks
Report repository

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.