mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
chore(Types): include @discordjs/voice typings (#5941)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
@@ -20,7 +20,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Build and deploy documentation
|
- name: Build and deploy documentation
|
||||||
uses: discordjs/action-docs@v1
|
uses: discordjs/action-docs@v1
|
||||||
|
|||||||
3
.github/workflows/publish-dev.yml
vendored
3
.github/workflows/publish-dev.yml
vendored
@@ -18,7 +18,8 @@ jobs:
|
|||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --ignore-scripts
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --ignore-scripts --no-optional
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
12
.github/workflows/test-cron.yml
vendored
12
.github/workflows/test-cron.yml
vendored
@@ -16,7 +16,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
@@ -34,7 +35,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Run TSLint
|
- name: Run TSLint
|
||||||
run: npm run lint:typings
|
run: npm run lint:typings
|
||||||
@@ -52,7 +54,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Register Problem Matcher
|
- name: Register Problem Matcher
|
||||||
run: echo "##[add-matcher].github/tsc.json"
|
run: echo "##[add-matcher].github/tsc.json"
|
||||||
@@ -73,7 +76,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Test documentation
|
- name: Test documentation
|
||||||
run: npm run docs:test
|
run: npm run docs:test
|
||||||
|
|||||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -14,7 +14,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
@@ -32,7 +33,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Run TSLint
|
- name: Run TSLint
|
||||||
run: npm run lint:typings
|
run: npm run lint:typings
|
||||||
@@ -50,7 +52,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Register Problem Matcher
|
- name: Register Problem Matcher
|
||||||
run: echo "##[add-matcher].github/tsc.json"
|
run: echo "##[add-matcher].github/tsc.json"
|
||||||
@@ -71,7 +74,8 @@ jobs:
|
|||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
# Remove --no-optional after Node 16 upgrade
|
||||||
|
run: npm ci --no-optional
|
||||||
|
|
||||||
- name: Test documentation
|
- name: Test documentation
|
||||||
run: npm run docs:test
|
run: npm run docs:test
|
||||||
|
|||||||
2364
package-lock.json
generated
2364
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -47,34 +47,33 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/collection": "^0.1.6",
|
"@discordjs/collection": "^0.1.6",
|
||||||
"@discordjs/form-data": "^3.0.1",
|
"@discordjs/form-data": "^3.0.1",
|
||||||
"@sapphire/async-queue": "^1.1.2",
|
"@sapphire/async-queue": "^1.1.4",
|
||||||
"@types/ws": "^7.4.4",
|
"@types/ws": "^7.4.5",
|
||||||
"abort-controller": "^3.0.0",
|
"abort-controller": "^3.0.0",
|
||||||
"discord-api-types": "^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e",
|
"discord-api-types": "^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"ws": "^7.4.6"
|
"ws": "^7.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^12.1.4",
|
"@commitlint/cli": "^12.1.4",
|
||||||
"@commitlint/config-angular": "^12.1.4",
|
"@commitlint/config-angular": "^12.1.4",
|
||||||
"@discordjs/docgen": "^0.10.0",
|
"@discordjs/docgen": "^0.10.0",
|
||||||
"@discordjs/voice": "^0.3.0",
|
"@types/node": "^14.17.4",
|
||||||
"@types/node": "^12.12.6",
|
|
||||||
"conventional-changelog-cli": "^2.1.1",
|
"conventional-changelog-cli": "^2.1.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"dtslint": "^4.1.0",
|
"dtslint": "^4.1.0",
|
||||||
"eslint": "^7.27.0",
|
"eslint": "^7.29.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.23.4",
|
"eslint-plugin-import": "^2.23.4",
|
||||||
"eslint-plugin-prettier": "^3.4.0",
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
"gen-esm-wrapper": "^1.1.1",
|
"gen-esm-wrapper": "^1.1.2",
|
||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"is-ci": "^3.0.0",
|
"is-ci": "^3.0.0",
|
||||||
"jest": "^27.0.3",
|
"jest": "^27.0.6",
|
||||||
"lint-staged": "^11.0.0",
|
"lint-staged": "^11.0.0",
|
||||||
"prettier": "^2.3.0",
|
"prettier": "^2.3.2",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"typescript": "^4.3.2"
|
"typescript": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": ">=14.0.0",
|
||||||
|
|||||||
@@ -8,15 +8,8 @@
|
|||||||
"pretty": false,
|
"pretty": false,
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"lib": [
|
"lib": ["esnext", "esnext.array", "esnext.asynciterable", "esnext.intl", "esnext.symbol"],
|
||||||
"esnext",
|
|
||||||
"esnext.array",
|
|
||||||
"esnext.asynciterable",
|
|
||||||
"esnext.intl",
|
|
||||||
"esnext.symbol"
|
|
||||||
],
|
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"skipDefaultLibCheck": true,
|
"skipDefaultLibCheck": true
|
||||||
"skipLibCheck": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
21
typings/index.d.ts
vendored
21
typings/index.d.ts
vendored
@@ -152,6 +152,25 @@ declare enum WebhookTypes {
|
|||||||
|
|
||||||
type Awaited<T> = T | Promise<T>;
|
type Awaited<T> = T | Promise<T>;
|
||||||
|
|
||||||
|
declare module '@discordjs/voice' {
|
||||||
|
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v8';
|
||||||
|
|
||||||
|
export interface DiscordGatewayAdapterLibraryMethods {
|
||||||
|
onVoiceServerUpdate(data: GatewayVoiceServerUpdateDispatchData): void;
|
||||||
|
onVoiceStateUpdate(data: GatewayVoiceStateUpdateDispatchData): void;
|
||||||
|
destroy(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DiscordGatewayAdapterImplementerMethods {
|
||||||
|
sendPayload(payload: any): boolean;
|
||||||
|
destroy(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DiscordGatewayAdapterCreator = (
|
||||||
|
methods: DiscordGatewayAdapterLibraryMethods,
|
||||||
|
) => DiscordGatewayAdapterImplementerMethods;
|
||||||
|
}
|
||||||
|
|
||||||
declare module 'discord.js' {
|
declare module 'discord.js' {
|
||||||
import BaseCollection from '@discordjs/collection';
|
import BaseCollection from '@discordjs/collection';
|
||||||
import { ChildProcess } from 'child_process';
|
import { ChildProcess } from 'child_process';
|
||||||
@@ -380,7 +399,7 @@ declare module 'discord.js' {
|
|||||||
public valueOf(): N;
|
public valueOf(): N;
|
||||||
public [Symbol.iterator](): IterableIterator<S>;
|
public [Symbol.iterator](): IterableIterator<S>;
|
||||||
public static FLAGS: unknown;
|
public static FLAGS: unknown;
|
||||||
public static resolve(bit?: BitFieldResolvable<S, N>): number | bigint;
|
public static resolve(bit?: BitFieldResolvable<any, number | bigint>): number | bigint;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ButtonInteraction extends MessageComponentInteraction {
|
export class ButtonInteraction extends MessageComponentInteraction {
|
||||||
|
|||||||
Reference in New Issue
Block a user