mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-23 12:00:09 +00:00
Compare commits
5 Commits
@discordjs
...
@discordjs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b45b99f92b | ||
|
|
5137bfc17d | ||
|
|
fca3dada2a | ||
|
|
d070de6da7 | ||
|
|
a3183cfad4 |
@@ -1,3 +1,3 @@
|
||||
import { createUnbuildConfig } from '../../build.config';
|
||||
|
||||
export default createUnbuildConfig({ minify: true });
|
||||
export default createUnbuildConfig({ minify: true, emitCJS: false });
|
||||
|
||||
@@ -10,14 +10,8 @@
|
||||
"format": "prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",
|
||||
"fmt": "yarn format"
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"main": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"directories": {
|
||||
"lib": "src",
|
||||
"test": "__tests__"
|
||||
|
||||
@@ -11,4 +11,4 @@ outputs:
|
||||
description: 'The semver string that was extracted from this tag'
|
||||
runs:
|
||||
using: node16
|
||||
main: ../../dist/formatTag/index.js
|
||||
main: ../../dist/formatTag/index.mjs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js",
|
||||
"version": "14.1.0",
|
||||
"version": "14.1.1",
|
||||
"description": "A powerful library for interacting with the Discord API",
|
||||
"scripts": {
|
||||
"test": "yarn docs:test && yarn test:typescript",
|
||||
|
||||
@@ -73,8 +73,8 @@ class Embed {
|
||||
* @typedef {Object} EmbedAssetData
|
||||
* @property {?string} url The URL of the image
|
||||
* @property {?string} proxyURL The proxy URL of the image
|
||||
* @property {?string} height The height of the image
|
||||
* @property {?string} width The width of the image
|
||||
* @property {?number} height The height of the image
|
||||
* @property {?number} width The width of the image
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/ws@0.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.1.0...@discordjs/ws@0.2.0) - (2022-07-30)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **WebSocketShard:** Account code 1000 with no prior indication (#8399) ([5137bfc](https://github.com/discordjs/discord.js/commit/5137bfc17d763488083b76ee9008611df333272a))
|
||||
|
||||
# [@discordjs/ws@0.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/ws@0.1.0) - (2022-07-27)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/ws",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "Wrapper around Discord's gateway",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
|
||||
@@ -460,8 +460,20 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
|
||||
private async onClose(code: number) {
|
||||
switch (code) {
|
||||
case 1000:
|
||||
case 4200: {
|
||||
case CloseCodes.Normal: {
|
||||
this.debug([`Disconnected normally from code ${code}`]);
|
||||
if (this.status === WebSocketShardStatus.Ready) {
|
||||
return this.destroy({
|
||||
code,
|
||||
reason: 'Got disconnected by Discord',
|
||||
recover: WebSocketShardDestroyRecovery.Reconnect,
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CloseCodes.Resuming: {
|
||||
this.debug([`Disconnected normally from code ${code}`]);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user