import { ActionRowBuilder, ButtonBuilder, InteractionEditReplyOptions, Message, MessageEditOptions, MessagePayload, User, } from 'discord.js'; import { Approve, ApproveConstructorOptions } from './Approve'; import { BaseConstructorOptions, ButtonStyle, DeepRequired, MessageType } from './Base'; export type TicTacToeGameCellState = 0 | 1 | 2; export interface TicTacToeConstructorOptions extends BaseConstructorOptions { opponent: User; embed?: { title?: string; statusTitle?: string; overTitle?: string; color?: string; }; emojis?: { xButton?: string; oButton?: string; blankButton?: string; }; timeoutTime?: number; xButtonStyle?: ButtonStyle; oButtonStyle?: ButtonStyle; turnMessage?: string; winMessage?: string; tieMessage?: string; timeoutMessage?: string; requestMessage?: string; rejectMessage?: string; } export class TicTacToe extends Approve { options: DeepRequired>; message: MessageType; opponent: User; gameBoard: [ TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState, TicTacToeGameCellState ]; player1Turn: boolean; on( eventName: 'gameOver', listener: (result: { result: 'win' | 'tie' | 'timeout'; player: User; opponent: User; gameBoard: TicTacToe['gameBoard']; }) => void ): this; once(...args: Parameters): this; constructor(options: ApproveConstructorOptions & TicTacToeConstructorOptions); sendMessage( content: string | MessagePayload | (IsSlashGame extends true ? InteractionEditReplyOptions : MessageEditOptions) ): Promise; startGame(): Promise; TicTacToeGame(msg: Message): Promise; handleButtons(msg: Message): void; gameOver(msg: Message, result: 'win' | 'tie' | 'timeout'): Promise; isGameOver(): boolean; hasWonGame(player: 1 | 2): boolean; getPlayerEmoji(): string; getTurnMessage(msg?: string): string; // The functiom argument name 'btn' should be changed to 'state' or something like this getButton(btn: TicTacToeGameCellState): { emoji: string; style: ButtonStyle }; getComponents(): ActionRowBuilder[]; }