パッケージの詳細

dressed

Inbestigator1.8kMIT1.8.1

A sleek, serverless-ready Discord bot framework.

bot, serverless, discord, discord-bot

readme

Dressed logo

Dressed

Dressed is a Discord bot framework with 100% API support. It allows you to host a bot using the interactions endpoint system for Discord.

Discord will send POST requests to your bot, instead of using the WebSocket system that libraries like Discord.js rely on.

One cool feature of Dressed is support for dynamic component IDs, so you only need to write one component handler for many different scenarios. 👉 See more

You can find examples of bots ready to deploy on Vercel and Deno Deploy in this repo.

🚀 Usage

bun add dressed
# or
deno add jsr:@dressed/dressed
// src/commands/ping.ts
import type { CommandConfig, CommandInteraction } from "dressed";

export const config: CommandConfig = {
  description: "Returns pong",
};

export default async function (interaction: CommandInteraction) {
  await interaction.reply({
    content: "Pong!",
    ephemeral: true,
  });
}

You can then build and run the bot with:

bun dressed build -ir
bun .dressed
# or
deno -A npm:dressed build -ir
deno -A .dressed/index.mjs
  • By default, the builder outputs only boilerplate data.
  • To include an instance creator, add the -i flag.
  • To register your bot's commands, add the -r flag.

[!TIP] For a better development experience, install Discord API Types.

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.