Giter Site home page Giter Site logo

ljneon / patron Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 4.0 1.77 MB

The cleanest discord.js and eris command framework.

Home Page: https://ljneon.github.io/patron/

License: GNU Lesser General Public License v2.1

JavaScript 100.00%
discordjs nodejs bot discord

patron's Introduction

Patron
Discord Server NPM Version NPM Downloads Build Status Dependencies License

About

Patron is an efficient and maintainable command framework for discord.js and Eris that aims for true flexibility. Patron doesn't have a modified client, manage the message event for you, or clutter other libraries with extensions. Patron has full support for TypeScript, as well as ECMAScript Modules.

Should I use Patron?

Patron isn't designed for beginners, but for those who want a highly flexible framework and fast development time. Bots with complex or many features will see higher maintainability and reusable code.

Installation

Patron is available on NPM and can be installed easily.

npm install patron

If you are using TypeScript (or rely on typings for code completion) you will need to use an additional command to properly set up typings. You need to have the Discord library installed beforehand. This command will need to be run again if you switch between libraries.

npx patron --typings=eris // or 'discordjs'

Documentation

Patron's API documentation is in an index.d.ts file with detailed comments, and there's a folder of guides explaining features with example code.

patron's People

Contributors

asshley avatar ljneon avatar realblazeit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

patron's Issues

No spacing preservation with remainder arguments.

All remainder arguments are joined with a single space, however, they are originally split by any whitespace. This means that if tabs or several spaces were used in a remainder argument, the parsed value would simply replace all contiguous whitespace with a single space.

Breaking change at Handler modularization

A breaking change was introduced here: 0c7134f

Here is the error when using this commit version, and no errors are produced from the previous commit.

johnpyp@johnpyp-UX330UAK:~/Desktop/Coding/dice-nation$ node src/index
/home/johnpyp/Desktop/Coding/dice-nation/node_modules/patron.js/src/structures/Handler.js:322
      throw new TypeError('Handler.registry must be an instance of the registry.');
      ^

TypeError: Handler.registry must be an instance of the registry.
    at Function.validateHandler (/home/johnpyp/Desktop/Coding/dice-nation/node_modules/patron.js/src/structures/Handler.js:322:13)
    at new Handler (/home/johnpyp/Desktop/Coding/dice-nation/node_modules/patron.js/src/structures/Handler.js:25:22)
    at Object.<anonymous> (/home/johnpyp/Desktop/Coding/dice-nation/src/events/message.js:10:17)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.