disploy
Warning: We're still in development, and the packages published are not up to date. They're just early builds that we've published to reserve our package names on NPM.
Disploy is a framework for building Discord bots with ease. It's designed to make it easy to build, test and deploy Discord bots.
It's as easy as 1, 2, 3, 4
#1
npx create-disploy-app@latest
# or
yarn create disploy-app
# or
pnpm create disploy-app
#2
// Example command
import type { Command } from 'disploy';
export default {
    name: 'hey',
    description: 'heyy!',
    async run(interaction) {
        interaction.deferReply(); // You can even defer on serverless platforms like Cloudflare Workers! https://disploy.dev/docs/Guide/learning-the-workflow/creating-commands#run
        await new Promise((resolve) => setTimeout(resolve, 2000));
        return void interaction.editReply({
            content: `Just wanted to say hey!`,
        });
    }
} satisfies Command;
#3
disploy dev # test your bot locally with hot-reloading and tunneling
#4
disploy deploy # deploy your bot to Cloudflare Workers
Planned Features
Testing
@disploy/disbench will be a testing library that will allow you to test your bot in a similar way to how you would test a web app with a mocked Discord API.
Example usage (this is not final):
// Disbench demo snippet (fake code)
import { Disbench } from '@disploy/disbench';
const disbench = new Disbench({
    app: 'dist/bot.js',
});
await disbench.setup(); // This will start the bot and start communicating with the framework to "deploy" commands to the mocked API
const echoCommand = disbench.commands.find({ name: 'echo' });
const response = await disbench.interact(echoCommand, {
    options: {
        message: 'Hello World!',
    },
});
expect(response).toEqual('Hello World!');
https://discord.gg/E3z8MDnTWn - Join our Discord server for support and updates!