discord-reflex-speed

An module to see your reflex speed

Usage no npm install needed!

<script type="module">
  import discordReflexSpeed from 'https://cdn.skypack.dev/discord-reflex-speed';
</script>

README

Installations

npm i discord-reflex-speed

Introduction

This package is for seeing who have the best reflexes. In this game / package bot sends a message than after x amount of time user have to repond with aWord to win, The first person to send the word wins.

How ?

const reflex = require("discord-reflex-speed");
const game = new reflex();

/**
 * Start a solo mode for a user
 * @param {Message} message The message in which command was used.
 * @returns {void | Error}
 */
game.solo(message)

/**
 * Start a duo mode for two players
 * @param {Message} message The message in which command was used.
 * @param {User} player2 The econd player
 * @returns {void | Error}
 */
game.duo(message, player2)

/**
 * Start a party mode for all human users
 * @param {Message} message The message in which command was used.
 * @returns {void | Error}
 */
game.party(message)

Advanced Settings

const reflex = require("discord-reflex-speed");

/**
  * The options for relfex game
  * @property {Array} words The array of random words
  * @property {"random" | Number} startAfter Time after which message collector starts
  * @property {Number} endIn Time after which message collector ends
  * @property {String} readyColor The color for ready embed
  * @property {String} readyTitle The title for ready embed
  * @property {String} startColor The color for start embed
  * @property {String} startTitle The title for start embed
  * @property {String} timeEndColor The color for embed sent when no one replied in time
  * @property {String} timeEndTitle The title for embed sent when no one replied in time
  * @property {String} endColor The color for embed sent when game is ended
  * @property {String} endTitle The title for embed sent when game is ended
  * @property {String} endDescription The title for embed sent when game is ended
  */
const game = new reflex({
    // Normal game settings 
    endIn: 6969,
    startAfter: "random", // or time in millseconds

    // Embed settings when game is getting ready
    readyColor: "#fr7434",
    readyTitle: "Get your toes ready",

    // Embed settings when game is started
    startColor: "#1c64e3",
    startTitle: "TYPE {word} FAST AS F else you looooose",

    // Embed settings when game ends after a timeout
    timeEndColor: "#000000",
    timeEndTitle: "You all are faliures",

    // Embed settings when game is ended
    endTitle: "GAME ENDEDED",
    endDescription: "Game ended winner is : {winner} in time {time}",
    endColor: "#ff0000",

    // The array of random words
    words: ["hi", "die"]
})

Images

  • Ready

ready.png

  • Started

started.png

  • Time end

timeend.png

  • Game end

end.png

Support

for support or issues or queries contace me on my discord server.