1.1.0 • Published 6 years ago
disper v1.1.0
Diser
Disper is a simple wrapper for Discord.js
#####Join my discord! My Discord server
Usage
The wrapper has a very simple to use API.
To make a new command do:
disper.newCommand('test',(args,msg) => {
msg.channel.send('Testing!');
});
This will fire everytime the command test
is ran. This automatically adds the prefix if one is set.
To set a prefix do:
disper.setPrefix(';');
Now commands will only be fired if they have the ;
prefix before them. This prefix can be set to anything you like, such as DisperIsReallyGoodAndReallyUseful
.
To listen for every message sent, if you se the command parameter to *OnAll
it will fire on every message sent.
Note: With the *OnAll
no args are passed, only the message instance is sent.
disper.newCommand('*OnAll',(args,msg) => {
msg.channel.send('This fires every time a message is sent!');
});