Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
A sleek, serverless-ready Discord bot framework.
Dressed
Dressed is a Discord bot library that allows you to host a bot using the interactions endpoint system for Discord.
Discord will send POST requests to your bot, instead of the websocket system that other libraries utilize.
One cool feature of Dressed is that you can make dynamic component IDs, so that you only need to write one component handler for many different scenarios. 👉 See more
You can find examples of bots ready to deploy on Cloudflare Workers, Vercel, and Deno Deploy in this repo.
🚀 Usage
bun add dressed
// src/commands/ping.ts import type { CommandConfig, CommandInteraction } from "dressed"; export const config = { description: "Checks the API latency", } satisfies CommandConfig; export default async function (interaction: CommandInteraction<typeof config>) { const start = Date.now(); const res = await interaction.deferReply({ ephemeral: true, with_response: true }); const delay = Date.parse(res.resource?.message?.timestamp ?? "") - start; await interaction.editReply(`🏓 ${delay}ms`); }
You can then build and run the bot with:
bun dressed build -ir bun .dressed
For more information on how to create a simple bot, check out the getting started guide.
Dressed includes a Node HTTP server out of the box.
If you'd prefer to create your own, all the functions you need are available within dressed/server.
Add Package
deno add jsr:@dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Import directly with a jsr specifier
import * as dressed from "jsr:@dressed/dressed";
Add Package
pnpm i jsr:@dressed/dressed
pnpm dlx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
yarn add jsr:@dressed/dressed
yarn dlx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
vlt install jsr:@dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
npx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
bunx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";