discord-slim
Advanced tools
Comparing version 2.0.0-dev.15 to 2.0.0
@@ -26,3 +26,3 @@ "use strict"; | ||
} | ||
const response = await util_1.SafePromise(request_1.Request('GET', '/gateway/bot', this._auth)); | ||
const response = await request_1.Request('GET', '/gateway/bot', this._auth).catch(() => { }); | ||
if (this._ws) | ||
@@ -29,0 +29,0 @@ return this.emit(ClientEvents.WARN, 'Client already connected.'); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Sleep = exports.SafePromise = exports.SafeJsonParse = void 0; | ||
exports.Sleep = exports.SafeJsonParse = void 0; | ||
const SafeJsonParse = (data) => { | ||
@@ -13,5 +13,3 @@ if (data != null) | ||
exports.SafeJsonParse = SafeJsonParse; | ||
const SafePromise = (promise) => new Promise(resolve => promise.then(result => resolve(result)).catch(() => resolve(null))); | ||
exports.SafePromise = SafePromise; | ||
const Sleep = (time) => new Promise((resolve) => setTimeout(resolve, time)); | ||
exports.Sleep = Sleep; |
{ | ||
"name": "discord-slim", | ||
"version": "2.0.0-dev.15", | ||
"version": "2.0.0", | ||
"description": "Lightweight Discord bot API for Node.js.", | ||
@@ -8,3 +8,3 @@ "author": "Hanabishi", | ||
"type": "git", | ||
"url": "https://github.com/HanabishiRecca/Discord-Slim/dev" | ||
"url": "https://github.com/HanabishiRecca/Discord-Slim" | ||
}, | ||
@@ -11,0 +11,0 @@ "homepage": "https://discord.gg/drsXkP8R4h", |
# Discord Slim | ||
[![npm](https://img.shields.io/npm/v/discord-slim/dev?style=for-the-badge)](https://www.npmjs.com/package/discord-slim/v/dev) | ||
[![npm](https://img.shields.io/npm/v/discord-slim?style=for-the-badge)](https://www.npmjs.com/package/discord-slim) | ||
Lightweight **Discord** client for **Node.js**. | ||
Lightweight **Discord** bot API for **Node.js**. | ||
Provides access to Discord client gateway and API for bots. | ||
Very minimalistic way without excessive abstractions and dependencies. Also with very low resources usage. | ||
### V2 IS UNDER DEVELOPMENT! | ||
## V2 IS NOW RELEASED! | ||
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. | ||
### V2 main features | ||
- Typed actions API instead of manual requests. | ||
- Typed events API instead of manual packet handling. | ||
- Actions is now independent from the client. | ||
- Uses new Discord API version (v8) with slash commands support | ||
- Sharding support | ||
- Voice connection support | ||
### New features | ||
- Typed actions instead of manual requests. | ||
- Typed events instead of manual packet handling. | ||
- Uses new Discord API version (v8) with all new features support. | ||
- Sharding. | ||
- Voice connection. | ||
### Support & suggestions server | ||
https://discord.gg/drsXkP8R4h | ||
### Support & suggestions | ||
[![discord](https://user-images.githubusercontent.com/13597663/113933123-a1b62e00-980d-11eb-8bdb-8ff439358010.png)](https://discord.gg/drsXkP8R4h) | ||
@@ -29,7 +23,10 @@ ## Before you start | ||
## Docs | ||
**TODO.** | ||
For now use e.g. VS Code for types completition. If you have any questions join our discord server. | ||
## Installation | ||
### Note: NPM version may be out-of-date and not contain latest repo commits. | ||
```sh | ||
npm i discord-slim | ||
``` | ||
npm i discord-slim@dev | ||
``` | ||
@@ -36,0 +33,0 @@ ## Usage example |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
1
139896
2900
139