From 5aaaffbda9535490ee8a52f2508d3dba12ccec12 Mon Sep 17 00:00:00 2001 From: Crawron Date: Thu, 21 Jul 2022 16:10:14 -0500 Subject: [PATCH] Update playground for djs v14 --- packages/reacord/playground/command-handler.ts | 2 +- packages/reacord/playground/main.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)