Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-slim

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-slim - npm Package Compare versions

Comparing version 2.0.0-dev.1 to 2.0.0-dev.2

5

dist/client.js

@@ -148,3 +148,6 @@ "use strict";

this._wsDisconnect(code);
this._wsConnect(true);
if (code < 4000)
this._wsConnect(true);
else
this.emit('fatal', `Fatal gateway error. Code: ${code}`);
};

@@ -151,0 +154,0 @@ this._onError = (error) => this.emit('error', error);

3

package.json
{
"name": "discord-slim",
"version": "2.0.0-dev.1",
"version": "2.0.0-dev.2",
"description": "Lightweight Discord client for Node.js.",

@@ -10,2 +10,3 @@ "author": "Hanabishi",

},
"discord": "https://discord.gg/drsXkP8R4h",
"main": "./dist/index.js",

@@ -12,0 +13,0 @@ "types": "./dist/index.d.ts",

# Discord Slim
### V2 IS UNDER DEVELOPMENT!
Contains breaking changes and incompatible with V1.
Dev version is unstable and can have bugs!
API is unfinished and may be changed with further updates.

@@ -19,3 +20,3 @@

## Installation
### Note: this version is unstable!
### Note: NPM version may be out-of-date and not contain latest repo commits.
```

@@ -36,6 +37,18 @@ npm i discord-slim@dev

client.on('connect', () => console.log('Connection established.'));
client.on('disconnect', (code) => console.error(`Disconnect. (${code})`));
client.on('warn', console.warn);
client.on('error', console.error);
client.on('fatal', (e) => { console.error(e); process.exit(1); });
client.events.on(Events.MESSAGE_CREATE, (message) => {
if(message.author.id == client.user.id) return;
if(message.content.toLowerCase().indexOf('hello bot') < 0) return;
Actions.Message.Create(message.channel_id, { content: `Hi, <@${message.author.id}>!` }, requestOptions);
Actions.Message.Create(message.channel_id, {
content: `Hi, <@${message.author.id}>!`,
message_reference: {
channel_id: message.channel_id,
message_id: message.id,
},
}, requestOptions);
});

@@ -42,0 +55,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