Forum > Coding >

[NEW NPM PACKAGE] ParseWabz, a command parser for NodeJS.

Wabz

Winning.js

Posts: 1956

Threads: 143

Joined: Apr, 2020

Reputation: 27

Posted

Just made my first NPM package :)

https://www.npmjs.com/package/parsewabz

https://github.com/rblxploit/parsewabz

 

see the index.js in example folder and the test.js file in the root folder for examples on how it works

here is an example:

[code]

const parsewabz = require("parsewabz");

var parser = new parsewabz({
prefix: "$",
args: {
hours: ["h"],
exp: ["e"],
},
});

console.log(parser.parseInput("$work -h 10 -e lol"));

[/code]

 

there is obviously more ways of using it (well 1 more)

just check the code, since im so bad at docs

  • 0

Added

for those who have no idea how this can be used, you can use this for discord bots.

also, this thing can fix the problem of the length of commands in wearedevs bot. since it can have small aliases you can do

!ban @Wabz --reason imagine talking about exploits

or

!ban @Wabz -r imagine talking about exploits

 

See more about that on the index.js in the example folder.

  • 0

Added

@Astronemi its useless for most discord bots, but for some reason wearedevs bot uses a system like this so i made that to fix the problem of having to type --reason because you can now have aliases such as -r

  • 0

My new discord is Wabz#1337 with ID 777154062789509130

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )