Skip to content

Falgames is a powerful npm package designed to help others create awesome discord bots

License

Notifications You must be signed in to change notification settings

falcao-g/Falgames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FALGAMES

Falgames is a helpful package to enhance your discord bot with fun and interactive minigames :)

npm version npm downloads Support server Stars

✨ Why Falgames?

  • Easy to use & beginner friendly.
  • Supports both message and slash commands.
  • Customizable to fit your bot's style.
  • 18 different minigames to choose from.

⚙️ Installation

Please note that Node v18+ and Discord.js v14+ is required.

npm i falgames

📷 Preview

Preview

📚 Usage

Starting a game with Falgames is as easy as the following example:

const { Snake } = require('falgames');

const Game = new Snake({
  message: message,
  isSlashGame: false,
  embed: {
    title: 'Snake Game',
    overTitle: 'Game Over',
    scoreText: '**Score:**',
    color: '#551476'
  },
  emojis: {
    board: '⬛',
    up: '⬆️', 
    down: '⬇️',
    left: '⬅️',
    right: '➡️',
  },
  snake: { head: '🟢', body: '🟩', tail: '🟢', over: '💀' },
  foods: ['🍎', '🍇', '🍊', '🫐', '🥕', '🥝', '🌽'],
  stopButton: 'Stop',
  timeoutTime: 60000,
  playerOnlyMessage: 'Only {player} can use these buttons.'
});

Game.startGame();
Game.on('gameOver', result => {
  console.log(result);  // =>  { result... }
});

Slash commands are also supported, just set the isSlashGame option to true and the message option to interaction:

const { Snake } = require('falgames');

const Game = new Snake({
  message: interaction,
  isSlashGame: true,
  //...
});

Make sure to check out the examples folder for more examples.

📜 Credits

This package is directed inspired by the Gamecord package.