UNPKG

discord.js-game

Version:

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

25 lines (22 loc) 796 B
# **🧩 Match Pairs** ```js const { MatchPairs } = require('discord-gamecord'); const Game = new MatchPairs({ message: message, isSlashGame: false, embed: { title: 'Match Pairs', color: '#5865F2', description: '**Click on the buttons to match emojis with their pairs.**' }, timeoutTime: 60000, emojis: ['🍉', '🍇', '🍊', '🥭', '🍎', '🍏', '🥝', '🥥', '🍓', '🫐', '🍍', '🥕', '🥔'], winMessage: '**You won the Game! You turned a total of `{tilesTurned}` tiles.**', loseMessage: '**You lost the Game! You turned a total of `{tilesTurned}` tiles.**', playerOnlyMessage: 'Only {player} can use these buttons.' }); Game.startGame(); Game.on('gameOver', result => { console.log(result); // => { result... } }); ```