mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 02:44:42 +12:00
fix(updating-to-v14): Prioritise JavaScript (#9401)
This commit is contained in:
parent
1c35425120
commit
5dcc6df224
1 changed files with 7 additions and 7 deletions
|
@ -502,12 +502,11 @@ This REST event has been removed as discord.js now uses [Undici](https://github.
|
|||
|
||||
<CH.Code>
|
||||
|
||||
```ts TypeScript
|
||||
```js JavaScript
|
||||
import diagnosticsChannel from 'node:diagnostics_channel';
|
||||
import { type DiagnosticsChannel } from 'undici';
|
||||
|
||||
diagnosticsChannel.channel('undici:request:create').subscribe((data) => {
|
||||
const { request } = data as DiagnosticsChannel.RequestCreateMessage;
|
||||
diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
|
||||
const { request } = data;
|
||||
console.log(request.method); // Log the method
|
||||
console.log(request.path); // Log the path
|
||||
console.log(request.headers); // Log the headers
|
||||
|
@ -515,11 +514,12 @@ diagnosticsChannel.channel('undici:request:create').subscribe((data) => {
|
|||
});
|
||||
```
|
||||
|
||||
```js JavaScript
|
||||
```ts TypeScript
|
||||
import diagnosticsChannel from 'node:diagnostics_channel';
|
||||
import { type DiagnosticsChannel } from 'undici';
|
||||
|
||||
diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
|
||||
const { request } = data;
|
||||
diagnosticsChannel.channel('undici:request:create').subscribe((data) => {
|
||||
const { request } = data as DiagnosticsChannel.RequestCreateMessage;
|
||||
console.log(request.method); // Log the method
|
||||
console.log(request.path); // Log the path
|
||||
console.log(request.headers); // Log the headers
|
||||
|
|
Loading…
Reference in a new issue