disgroove 3.0.0-dev.72bf12 → 3.0.0-dev.7dc321a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Client.d.ts +43 -46
- package/dist/lib/Client.js +12 -6
- package/dist/lib/constants.d.ts +5 -3
- package/dist/lib/constants.js +5 -3
- package/dist/lib/gateway/Dispatcher.d.ts +104 -0
- package/dist/lib/gateway/Dispatcher.js +471 -0
- package/dist/lib/gateway/Shard.d.ts +10 -22
- package/dist/lib/gateway/Shard.js +100 -646
- package/dist/lib/gateway/Transmitter.d.ts +22 -0
- package/dist/lib/gateway/Transmitter.js +93 -0
- package/dist/lib/gateway/WebSocketManager.d.ts +22 -0
- package/dist/lib/gateway/WebSocketManager.js +93 -0
- package/dist/lib/transformers/Presences.d.ts +3 -3
- package/dist/lib/types/gateway-events.d.ts +201 -75
- package/dist/lib/utils/errors.d.ts +3 -1
- package/dist/lib/utils/errors.js +4 -0
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +1 -0
- package/dist/lib/utils/permissions.d.ts +2 -0
- package/dist/lib/utils/permissions.js +7 -0
- package/dist/package.json +1 -1
- package/package.json +2 -2
- package/d +0 -2268
package/dist/lib/utils/errors.js
CHANGED
|
@@ -47,8 +47,12 @@ class HTTPError extends Error {
|
|
|
47
47
|
exports.HTTPError = HTTPError;
|
|
48
48
|
class GatewayError extends Error {
|
|
49
49
|
name = "GatewayError";
|
|
50
|
+
code;
|
|
51
|
+
reason;
|
|
50
52
|
constructor(code, reason) {
|
|
51
53
|
super(`[${code}] ${reason}`);
|
|
54
|
+
this.code = code;
|
|
55
|
+
this.reason = reason;
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
exports.GatewayError = GatewayError;
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasPermission = hasPermission;
|
|
4
|
+
/** https://discord.com/developers/docs/topics/permissions */
|
|
5
|
+
function hasPermission(userPermissions, permission) {
|
|
6
|
+
return (BigInt(userPermissions) & permission) === permission;
|
|
7
|
+
}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.7dc321a",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ws": "^8.18.3"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|