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.
For more information on common functions (e.g. getUser, createChannel, etc.), see the docs on JSR
Discord will send POST requests to your bot, instead of the websocket system that Discord.js utilizes.
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 an example of some bots ready to deploy on Vercel and Deno deploy in this repo.
Installation
bun add 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 this command
bun dressed build -ir
bun .dressed
By default the builder outputs only boilerplate data, if you want it to
include an instance creator, add -i
when running the build command.
In order to register the commands for your bot, you can run the build command with -r
.
In addition to Dressed, I'd recommend installing Discord API Types (The type lib that Dressed uses internally).
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
.