utarwyn / discord-tictactoe

Highly customizable innovative Discord Bot for playing Tic-Tac-Toe 🎮🏅
https://npmjs.com/package/discord-tictactoe
Apache License 2.0
100 stars 35 forks source link

TypeError: interaction?.isChatInputCommand is not a function #681

Open suman9725 opened 2 months ago

suman9725 commented 2 months ago

While running the slash Command it's not working This saying -

Message to Console An [unhandledRejection] has occurred.

TypeError: interaction?.isChatInputCommand is not a function Source: process.on('unhandledRejection') @ 9:46:47 PM GMT+0530•Today at 9:46 PM

This the code I am using inside a command handler: commands/tictactoe.js

const { SlashCommandBuilder, Client, CommandInteractionOptionResolver, Options } = require("discord.js"); const TicTacToe = require("discord-tictactoe"); const game = new TicTacToe({ language: "en", commandOptionName: "user"}); // change here

module.exports = { name: "tictactoe", description: "Play a game of tictactoe", data: new SlashCommandBuilder() .setName("tictactoe") .setDescription("Play a game of TicTacToe!") .addUserOption((option) => option.setName("user").setDescription("Select user to play with!").setRequired(false)), /**

}

utarwyn commented 2 months ago

Hello @suman9725! Which version of discord-tictactoe and discord.js are you using?

suman9725 commented 2 months ago

Discord.js : 14.15.3 discord.tictactoe: 4.2.0

Actually its's working but after 2nd move its is not accepting my move, its saying bot is thinking and not taking my move