From cf1f5c0f0c46a85f5aa9353e4cbe0adf563793e6 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sun, 16 Apr 2023 19:21:30 +0100 Subject: [PATCH] chore(async-await): Update to ESM (#9403) --- .../guide/src/content/03-additional-info/01-async-await.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/guide/src/content/03-additional-info/01-async-await.mdx b/apps/guide/src/content/03-additional-info/01-async-await.mdx index 5c236c234..2e236b6b0 100644 --- a/apps/guide/src/content/03-additional-info/01-async-await.mdx +++ b/apps/guide/src/content/03-additional-info/01-async-await.mdx @@ -102,15 +102,15 @@ Now that you know how Promises work and what they are used for, let's look at an ```js -const { Client, GatewayIntentBits } = require('discord.js'); +import { Client, Events, GatewayIntentBits } from 'discord.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); -client.once('ready', () => { +client.once(Events.ClientReady, () => { console.log('I am ready!'); }); -client.on('interactionCreate', (interaction) => { +client.on(Events.InteractionCreate, (interaction) => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName === 'react') {