mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 23:54:45 +12:00
chore(async-await): Update to ESM (#9403)
This commit is contained in:
parent
a210fc64a2
commit
cf1f5c0f0c
1 changed files with 3 additions and 3 deletions
|
@ -102,15 +102,15 @@ Now that you know how Promises work and what they are used for, let's look at an
|
|||
<CH.Code>
|
||||
|
||||
```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') {
|
||||
|
|
Loading…
Reference in a new issue