Important
Currently the documentation here pertains to the canary tag of Dressed (dressed@1.10.0-canary.5.x
), keep in mind that some items (especially talked about in the deployment guides) are not available / work slightly differently in the @latest
version.
Deploying
These are some guides for helping you deploy your bots on various serverless providers.
Tip
While the examples should function without it, setting "type": "module"
in your package.json
may be helpful.
Warning
Most serverless providers stop the server as soon as your handler's promise resolves, so your handlers should either return promises or await them.
export default async function myCommand(interaction) {
interaction.reply("This may not finish because"); // ❌ There's nothing telling the server that something crucial is still happening
await interaction.reply("This will always work"); // ✅ // Awaiting makes the server wait for this to finish
return interaction.reply("This too"); // ✅ Your handler function is awaited, so returning acts like `await`
}