Skip to main content

rps

This is an example of rps (Rock Paper Scissors)

TIP

This function has became Promised based and can return the winner <User>

With Customization

const simplydjs = require("simply-djs");

messageCreate Event (rps command)

// messageCreate Event

simplydjs.rps(message, {
embedColor: "hex code", // default: #075FFF
timeoutEmbedColor: "hex code", // default: #c90000
drawEmbedColor: "hex code", // default: #075FFF
winEmbedColor: "hex code", // default: #06bd00
embedFooter: "A Game of RPS",
rockColor: "colors", // default: SECONDARY
paperColor: "colors", // default: SECONDARY
scissorsColor: "colors" // default: SECONDARY
});
INFO

Without Customization

messageCreate Event (rps command)

// messageCreate Event

simplydjs.rps(message);

Returns <User>

  • rps returns the user who won the match. so you can reward them with some money or xp.
TIP

Slash Support.

The package supports Auto Slash Recognition ! So no more slash options.

Slash command format

{
name: 'rps',
description: 'Just a fun rps using simply-djs',
options: [{
name: 'user',
type: 'USER',
description: 'user to compete with in rps using simply-djs',
required: true,
}],
}

Output

image

Options for rps function

OptionsTypeRequiredDefaultDescription
slashBooleanโœ˜falseSlash Support for the rps (need to be in a slash command)

Slash Customization

OptionsTypeRequiredDefaultDescription
userSlashStringโœ˜userCustomize the Slash Option name (user slash option)

Embed

OptionsTypeRequiredDefaultDescription
embedColorHex Codeโœ˜#075FFFColor of the rps embed
embedFootStringโœ˜creditFooter of the Embed..
timeoutEmbedColorHex Codeโœ˜#cc0000Color of the rps timeout embed
drawEmbedColorHex Codeโœ˜#075FFFColor of the rps tie embed
winEmbedColorHex Codeโœ˜##06bd00Color of the rps winner embed
creditBooleanโœ˜trueCredit the package

Buttons

OptionsTypeRequiredDefaultDescription
rockColorButton Styleโœ˜SECONDARYColor of the rps Rock Button
paperColorButton Styleโœ˜SECONDARYColor of the rps Paper Button
scissorsColorButton Styleโœ˜SECONDARYColor of the rps Scissors Button