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

const { TwoZeroFourEight } = require('flex-gamecord');
const Game = new TwoZeroFourEight({
message: message,
isSlashGame: false,
embed: {
title: '2048',
color: '#5865F2',
fields: [
{
name: 'Current Score',
value: '{score}',
inline: true,
},
{
name: 'Player',
value: '{player}', // Options: {player.tag} {player} {player.displayName}
inline: true,
}
],
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: {
up: '⬆️',
down: '⬇️',
left: '⬅️',
right: '➡️',
},
timeoutTime: 60000,
buttonStyle: 'PRIMARY',
playerOnlyMessage: 'Only {player} can use these buttons.'
});
Game.startGame();
Game.on('gameOver', result => {
console.log(result); // => { result... }
});
message: interaction,
isSlashGame: true,
*** v4.2.3
+ Added footer/timeStamp option
+ Added option to disable footer
+ Added fields option
+ Removed API fetch and made game local using canvas