Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score100%
Downloads1/wk
Published2 months ago (1.10.1)

A sleek, serverless-ready Discord bot framework.

Dressed logo

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.

Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@dressed/dressed

Import symbol

import * as dressed from "@dressed/dressed";
or

Import directly with a jsr specifier

import * as dressed from "jsr:@dressed/dressed";

Add Package

pnpm i jsr:@dressed/dressed
or (using pnpm 10.8 or older)
pnpm dlx jsr add @dressed/dressed

Import symbol

import * as dressed from "@dressed/dressed";

Add Package

yarn add jsr:@dressed/dressed
or (using Yarn 4.8 or older)
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";