wumpy
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

wumpy

Wumpy is a minimal framework built on top of discord.js.

Inspired by the Next.js and Nuxt.js frameworks, wumpy uses a convention over configuration approach.

Status

Please note that this project is still a work in progress, and the public api is likely to change a lot.

Getting Started

Install wumpy in your project:

npm install wumpy

Add a build script to your package.json:

"scripts"{
  "build": "wumpy build"
}

A wumpy bot doesn't do much without commands. A command is simply a function that is exported from a .js file in the commands directory.

By default, a command's trigger is based off of its file name. For example commands/ping.js will be triggered by a message starting with !ping.

Create a commands directory inside of your project, then create the ping.js file in the commands directory and populate it with the following:

export function run(message) {
  message.channel.send('pong')
}

Build your app by running npm run build. This will build your app to the out directory.

You can then run your bot as you would any other node program. Run the following in your terminal:

node ./out/main.js

Package Sidebar

Install

npm i wumpy

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

1.01 MB

Total Files

35

Last publish

Collaborators

  • brattonross