tictactoe
One line implementation of a super enjoyable tictactoe game.
Program
- Javascript
- Typescript
const simplydjs = require("simply-djs");
import simplydjs from "simply-djs";
simplydjs.tictactoe(interaction, {
// options (optional)
})
Output
Arguments:
simplydjs.tictactoe(
interaction: Discord.Message | Discord.CommandInteraction,
options: tttOptions
)
- interaction
Discord.Message
|Discord.CommandInteraction
- options:
tttOptions
Options tttOptions
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
embed | CustomizableEmbed | ❌ | Default Embed | Pass a CustomizableEmbed Object to customize the embed |
result | 'Button' / 'Embed' | ❌ | 'EMBED' | Choose the way you want to show the results of the match |
user | User | ❌ | none | The opponent you're playing with. |
buttons | tttButtons | ❌ | Default Buttons | Pass an tttButtons Object to customize the buttons |
tttButtons options
tttButtons
Parameter | Type | Description |
---|---|---|
X | tttBtnTemplate | The Customization of the move of the 'X' user |
O | tttBtnTemplate | The Customization of the move of the 'O' user |
idle | tttBtnTemplate | The Customization of the button which is not occupied |
tttBtnTemplate
tttBtnTemplate
Parameter | Type | Description |
---|---|---|
style | MessageButtonStyle | The Style of the Button of your choice |
emoji | string | Custom Emoji (or) any emoji for your button. |