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 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 Deno deploy in this repo.
deno add jsr:@dressed/dressed
// src/commands/ping.ts import type { CommandConfig, CommandInteraction } from "@dressed/dressed"; export const config: CommandConfig = { description: "Returns pong", }; export default async function ping(interaction: CommandInteraction) { await interaction.reply({ content: "Pong!", ephemeral: true, }); }
You can then build and run the bot with this command
deno -A jsr:@dressed/cmd build -ir deno -A bot.gen.ts
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, also run the build command with
-r
(requires -i
).
In addition to Dressed, I'd recommend installing Discord API Types (The type lib that Dressed uses internally).
Dressed comes with an Express serve system OOB, if you'd like to make your own,
all the functions needed to do so are available in @dressed/dressed/server
.
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
npx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
yarn dlx jsr add @dressed/dressed
Import symbol
import * as dressed from "@dressed/dressed";
Add Package
pnpm dlx 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";