New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discord-message-handler

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-message-handler - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "discord-message-handler",
"version": "1.0.1",
"version": "1.0.2",
"description": "Message and command handler for discord.js bots and applications.",

@@ -5,0 +5,0 @@ "main": "./src/index",

@@ -31,3 +31,3 @@ ##About

MessageHandler.onCommand("/doit").do((args, rawArgs, message) => {
doSomething(args);
message.channel.sendMessage(`Doing something for ${message.author}...`)
});

@@ -48,3 +48,10 @@ ```

###Case sensitivity
In case you want message filters to be case sensitive you just need to call this function once:
```js
MessageHandler.setCaseSensitive(true);
```
By default all message filters are case insensitive. (false)
##Contributing
Feel free to send a pull request or open an issue if something is not working as intended or you belive could be better.

@@ -109,3 +109,3 @@ const MessageType = {

then(callback) {
callback(this.discordMessage.content);
callback(this.discordMessage);
}

@@ -115,6 +115,4 @@

var minimumArgs = minArgs || 0;
let args = this.discordMessage.content.trim().split(" ");
let message = this.discordMessage.content.trim();
let args = message.split(" ");
// Remove command from args

@@ -128,3 +126,3 @@ args.splice(0,1);

} else {
callback(args, rawArgs, message);
callback(args, rawArgs, this.discordMessage);
}

@@ -131,0 +129,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc