Skip to content

Britmoji/yoodle

Repository files navigation

The Yawning Abyss

Yoodle

⚒️ Get it cause it sounds like "Util" but it's "Yoodle" isn't that funny?

Features

  • All of them.
  • (Currently none)

Banner

Just a little something I made, you know, for fun.

Hellscape

Running (TypeScript / Cloudflare Workers)

Yoodle runs as a Cloudflare Worker. Discord's Gateway connection is a persistent outbound WebSocket held open by a Durable Object (GatewayDurableObject), which also handles slash commands and buttons arriving over that same connection — there's no separate HTTP interactions endpoint. A cron trigger pings the object every 5 minutes so it reconnects if Cloudflare ever evicts it. This runs on the Workers Free plan (Durable Objects with the SQLite storage backend, which this project uses, don't require Workers Paid).

Setup

  1. npm install
  2. In the Discord Developer Portal, enable the Message Content Intent under Bot settings (required — several features read plain message content).
  3. Set secrets:
    npx wrangler secret put DISCORD_TOKEN
    npx wrangler secret put DISCORD_APPLICATION_ID
    
  4. Configure wrangler.jsonc's vars:
    • GUILD_ID — set to register slash commands to a single guild instantly (empty string registers them globally, which can take up to an hour to propagate)
    • LINK_REPLACER_SITES — JSON object mapping hostnames to their replacement, e.g. {"x.com":"fxtwitter.com"}
    • OOMFIES_ROLE_ID / OOMFIES_RESPONSES — role id and JSON array of GIF URLs for the oomfies auto-responder
  5. For local dev, copy .dev.vars.example to .dev.vars and fill in the secrets, then npm run dev.
  6. Deploy with npm run deploy.

Slash commands are (re)registered automatically every time the bot reconnects to the Gateway (on the READY event), so there's no separate registration script to run.

About

⚒️ Get it cause it sounds like "Util" but it's "Yoodle" isn't that funny?

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors