Skip to content

ConCodesStuff/disploy

 
 

Repository files navigation


disploy


Disploy's Discord server Tests status

Vercel

Warning: This README is out of date, we reccomend you read our in-development documentaion and guide to learn more about Disploy. We also have a contributing guide if you're interested 💙

Planned Features

CLI

  • Bootstrapping a new project
  • Development server that automatically exposed to the internet using ngrok
  • Rolling up a production build using rollup and deploying to the edge (Vercel, Cloudflare workers, etc)

Framework

The Disploy framework will be a batteries-included framework that will feel like writing an Next.js app but instead you're making a Discord application, it will include internally a wrapper of the Discord API; turning raw API objects into classes and providing a nice interface to work with, interaction routing and more, while on the outside API; exposing a command and message component framework. The framework is not a server; rather it has a Router that takes in requests from the entry method and handles the request accordingly.

// Example command
import { Command, type ChatInputInteraction } from '@disploy/framework';

export default class HeyCommand extends Command {
	public constructor() {
		super({
			name: 'hey',
			description: 'heyy!',
		});
	}

	override async slashRun(interaction: ChatInputInteraction) {
		return void interaction.reply({
			content: `heyy!`,
		});
	}
}

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

About

Next.js for Discord applications - The ecosystem to help you create your Discord bot.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 85.0%
  • JavaScript 12.6%
  • CSS 2.4%