tictactoe
This is an example of tictactoe
TIP
This function has became Promised based and can return the winner <User>
With Customization
const simplydjs = require("simply-djs");
messageCreate
Event (tictactoe command)
// messageCreate Event
simplydjs.tictactoe(message, {
xEmoji: "emoji id", //default: โ
oEmoji: "emoji id", //default: โญ
idleEmoji: "emoji id", //default: โ
embedColor: "hex code", //default: #075FFF
embedFoot: "text for footer" //default: 'Make sure to win ;)'
});
INFO
Without Customization
messageCreate
Event (tictactoe command)
// messageCreate event
simplydjs.tictactoe(message);
Returns <User>
- tictactoe 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: 'tictactoe',
description: 'Just a fun TicTacToe. Using simply-djs',
options: [{
name: 'user',
type: 'USER',
description: 'user to compete with in TicTacToe using simply-djs',
required: true,
}],
}
Output
Options for tictactoe function
Options | Type | Required | Default | Description |
---|---|---|---|---|
slash | Boolean | โ | false | Slash Support for the Tictactoe (need to be in a slash command) |
resultBtn | Boolean | โ | false | Results will be in buttons not as code blocks |
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 Tictactoe guide embed |
embedFoot | String | โ | credits | Embed Footer when the credits turned off |
timeoutEmbedColor | Hex Code | โ | #cc0000 | Color of the Tictactoe timeout alert embed |
credit | Boolean | โ | true | Credit the package |