@@ -471,7 +471,7 @@ Persisting data through restarts requires a database. Check out the resources be
471471keywords = [" delay" , " sleep" , " setTimeout" ]
472472content = """
473473```js
474- const { setTimeout } = require(' timers/promises') ;
474+ import { setTimeout } from 'node: timers/promises';
475475// using async/await
476476await setTimeout(5000);
477477...
@@ -526,12 +526,12 @@ keywords = ["code-block", "code-blocks", "cb", "code-box", "codebox"]
526526content = """
527527**Codeblocks:**
528528\\ `\\ `\\ `js
529- const Discord = require( "discord.js");
529+ import { Client } from "discord.js";
530530// further code
531531\\ `\\ `\\ `
532532becomes
533533```js
534- const Discord = require( "discord.js");
534+ import { Client } from "discord.js";
535535// further code
536536```
537537**Inline Code:**
@@ -698,7 +698,7 @@ content = """
698698`Error [VoiceConnectionTimeout]: Connection not established within 15 seconds.`
699699Make sure you have provided the `GuildVoiceStates` intent to the client:
700700```js
701- const { Client, GatewayIntentBits } = require( 'discord.js') ;
701+ import { Client, GatewayIntentBits } = from 'discord.js';
702702const client = new Client({
703703 intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates]
704704});
@@ -945,7 +945,7 @@ content = """
945945If you aren't getting content, embeds or attachments of a message, make sure you have the `MessageContent` intent [enabled in the Developer Portal](https://discord.com/developers/applications) and provide it to your client:
946946
947947```js
948- const { Client, GatewayIntentBits } = require( 'discord.js') ;
948+ import { Client, GatewayIntentBits } from 'discord.js';
949949const client = new Client({
950950 intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
951951});
@@ -1088,9 +1088,9 @@ keywords = ["functions", "utils"]
10881088content = """
10891089The `Util` class has been removed. Associated functions are now available as top-level imports:
10901090```diff
1091- - const { Util } = require( 'discord.js') ;
1091+ - import { Util } = from 'discord.js';
10921092- Util.escapeMarkdown('`string`');
1093- + const { escapeMarkdown } = require( 'discord.js') ;
1093+ + import { escapeMarkdown } = from 'discord.js';
10941094+ escapeMarkdown('`string`');
10951095```
10961096"""
0 commit comments