Update playground for djs v14
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user