Better HN
topnewbestaskshowjobs
Log inSign up

mrbbot

8 karma · joined Jul 6, 2021 (5y ago) · 3 submissions

Submissions

comment 4y ago · link · parent

Slshx is a library for building strongly-typed Discord commands (https://discord.com/developers/docs/interactions/application...) that run on Cloudflare Workers (https://workers.cloudflare.com/), using a React-inspired syntax (hooks and JSX). It supports all Discord command types/options, autocomplete and interactive message components. During development, it automatically deploys your commands whenever you change your code.

I created this because I think Cloudflare Workers are a great fit for hosting Discord commands, but there wasn't an easy way to get started that had a fun development experience. I also wanted to see what a Miniflare-first (https://github.com/cloudflare/miniflare) library could look like.

2.

Show HN: Slshx – React-inspired Discord commands on Cloudflare Workers(github.com ↗)

1 points · by mrbbot · 4y ago · 1 comment

comment 5y ago · link · parent

Miniflare author here. Miniflare uses the Node VM module (https://nodejs.org/api/vm.html#vm_class_vm_script) which is slightly higher level than V8 isolates used by Cloudflare Workers, but the same underlying engine.

Without low level isolate support in Node, it would be difficult to emulate CPU time limitations. Miniflare will report how long requests take, but this includes I/O time.