diff --git a/packages/reacord/playground/command-handler.ts b/packages/reacord/playground/command-handler.ts index 2b49ad0..795b0ae 100644 --- a/packages/reacord/playground/command-handler.ts +++ b/packages/reacord/playground/command-handler.ts @@ -22,7 +22,7 @@ export function createCommandHandler(client: Client, commands: Command[]) { }) client.on("interactionCreate", async (interaction) => { - if (!interaction.isCommand()) return + if (!interaction.isChatInputCommand()) return const command = commands.find( (command) => command.name === interaction.commandName, diff --git a/packages/reacord/playground/main.tsx b/packages/reacord/playground/main.tsx index 2e3492d..e7f0862 100644 --- a/packages/reacord/playground/main.tsx +++ b/packages/reacord/playground/main.tsx @@ -1,4 +1,4 @@ -import { Client } from "discord.js" +import { Client, IntentsBitField } from "discord.js" import "dotenv/config" import React from "react" import { Button, ReacordDiscordJs, useInstance } from "../library/main" @@ -7,7 +7,7 @@ import { Counter } from "./counter" import { FruitSelect } from "./fruit-select" const client = new Client({ - intents: ["GUILDS"], + intents: IntentsBitField.Flags.Guilds, }) const reacord = new ReacordDiscordJs(client)