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
Options for rps function
Options | Type | Required | Default | Description |
---|---|---|---|---|
slash | Boolean | โ | false | Slash Support for the rps (need to be in a slash command) |
Slash Customization
Options | Type | Required | Default | Description |
---|---|---|---|---|
userSlash | String | โ | user | Customize the Slash Option name (user slash option) |
Embed
Options | Type | Required | Default | Description |
---|---|---|---|---|
embedColor | Hex Code | โ | #075FFF | Color of the rps embed |
embedFoot | String | โ | credit | Footer of the Embed.. |
timeoutEmbedColor | Hex Code | โ | #cc0000 | Color of the rps timeout embed |
drawEmbedColor | Hex Code | โ | #075FFF | Color of the rps tie embed |
winEmbedColor | Hex Code | โ | ##06bd00 | Color of the rps winner embed |
credit | Boolean | โ | true | Credit the package |
Buttons
Options | Type | Required | Default | Description |
---|---|---|---|---|
rockColor | Button Style | โ | SECONDARY | Color of the rps Rock Button |
paperColor | Button Style | โ | SECONDARY | Color of the rps Paper Button |
scissorsColor | Button Style | โ | SECONDARY | Color of the rps Scissors Button |