forked from aniket091/Gamecord
-
Notifications
You must be signed in to change notification settings - Fork 0
Tic Tac Toe
Mr5ecret edited this page Jan 20, 2024
·
3 revisions

const { TicTacToe } = require('flex-gamecord');
const Game = new TicTacToe({
message: message,
isSlashGame: false,
opponent: message.mentions.users.first(),
embed: {
title: 'Tic Tac Toe',
color: '#5865F2',
statusTitle: 'Status',
overTitle: 'Game Over',
footerEnabled: false,
footer: {
text: `PΛΞ0NIC Development`,
// iconURL: 'someIconURL', // If you want to add iconURL then remove the comment and add working url!
},
timestamp: false,
},
emojis: {
xButton: '❌',
oButton: '🔵',
blankButton: '➖'
},
mentionUser: true,
timeoutTime: 60000,
xButtonStyle: 'DANGER',
oButtonStyle: 'PRIMARY',
turnMessage: '{emoji} | Its turn of player {player.displayName}.', // {player.tag} {player} {player.displayName}
winMessage: '{emoji} | {player.displayName} won the TicTacToe Game.',
tieMessage: 'The Game tied! No one won the Game!',
timeoutMessage: 'The Game went unfinished! No one won the Game!',
playerOnlyMessage: 'Only {player.displayName} and {opponent.displayName} can use these buttons',
});
Game.startGame();
Game.on('gameOver', result => {
console.log(result); // => { result... }
});
message: interaction,
isSlashGame: true,
opponent: interaction.options.getUser('user')
*** v4.2.3
+ Added option to disable footer
*** v4.2.1-dev
+ Added footer/timestamp options