UNPKG

discord.js-game

Version:

Discord games is a powerful npm package with a collection of minigames for your discord bot

26 lines (23 loc) 708 B
# **💣 Minesweeper** ```js const { Minesweeper } = require('discord-gamecord'); const Game = new Minesweeper({ message: message, isSlashGame: false, embed: { title: 'Minesweeper', color: '#5865F2', description: 'Click on the buttons to reveal the blocks except mines.' }, emojis: { flag: '🚩', mine: '💣' }, mines: 5, timeoutTime: 60000, winMessage: 'You won the Game! You successfully avoided all the mines.', loseMessage: 'You lost the Game! Beaware of the mines next time.', playerOnlyMessage: 'Only {player} can use these buttons.' }); Game.startGame(); Game.on('gameOver', result => { console.log(result); // => { result... } }); ```