utarwyn / discord-tictactoe

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

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

Open sounak9725 opened 4 months ago

sounak9725 commented 4 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 4 months ago

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

sounak9725 commented 4 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