@dressed/framework
v0.5.0
Published
A framework for creating Discord bots using Dressed.
Maintainers
Readme
@dressed/framework
An opinionated framework for creating Discord bots using Dressed.
Because this library is intended primarily for bundling and organizing your handler files, it can be used as a dev dependency.
🚀 Usage
bun add dressed
bun add -d @dressed/framework// 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