

Build Faster
Deploy Anywhere
A sleek, serverless-ready Discord API library.
import { createMessage } from "dressed";
createMessage("<CHANNEL_ID>", "Hello from Dressed!");import { createConnection } from "@dressed/ws";
const connection = createConnection({ intents: ["GuildMessages"] });
connection.onMessageCreate((message) => {
if (message.author.bot) return;
if (message.content === "ping") {
createMessage(message.channel_id, "Pong!");
}
});import { ActionRow, Button, Container, TextDisplay } from "dressed";
createMessage("<CHANNEL_ID>", {
components: [
Container(
TextDisplay("# Hello!\nThis is a Components V2 message."),
ActionRow(Button({ custom_id: "click_me", label: "Click me" })),
),
],
flags: ["IsComponentsV2"],
});import { createInteraction } from "dressed/server";
connection.onInteractionCreate((interaction) => {
if (interaction.type !== 3) return;
return createInteraction(interaction).reply("You like efficient code!");
});const { Client } = require("library.js");
const client = new Client({ intents: ["GuildMessages"] });
client.once("ready", async () => {
const channel = await client.channels.fetch("<CHANNEL_ID>");
await channel.send("Hello");
});
client.login(process.env.DISCORD_TOKEN);client.on("messageCreate", (message) => {
if (message.author.bot) return;
if (message.content === "ping") {
message.channel.send("Pong!");
}
});const { ContainerBuilder, TextDisplayBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder } = require("discord.js");
client.once("ready", async () => {
const channel = await client.channels.fetch("<CHANNEL_ID>");
const container = new ContainerBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder()
.setContent("# Hello!\nThis is a Components V2 message.")
)
.addActionRowComponents(
new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId("click_me")
.setLabel("Click me")
.setStyle(ButtonStyle.Primary)
)
);
await channel.send({
components: [container],
flags: ["IsComponentsV2"],
});
});