Skip to main content

tictactoe

One line implementation of a super enjoyable tictactoe game.

Program​

const simplydjs = require("simply-djs");
simplydjs.tictactoe(interaction, { 
// options (optional)
})

Output​

image

Arguments:​

simplydjs.tictactoe(
interaction: Discord.Message | Discord.CommandInteraction,
options: tttOptions
)

Options tttOptions​

ParameterTypeRequiredDefaultDescription
embedCustomizableEmbed❌Default EmbedPass a CustomizableEmbed Object to customize the embed
result'Button' / 'Embed'❌'EMBED'Choose the way you want to show the results of the match
userUser❌noneThe opponent you're playing with.
buttonstttButtons❌Default ButtonsPass an tttButtons Object to customize the buttons
tttButtons options

tttButtons​

ParameterTypeDescription
XtttBtnTemplateThe Customization of the move of the 'X' user
OtttBtnTemplateThe Customization of the move of the 'O' user
idletttBtnTemplateThe Customization of the button which is not occupied
tttBtnTemplate

tttBtnTemplate​

ParameterTypeDescription
styleMessageButtonStyleThe Style of the Button of your choice
emojistringCustom Emoji (or) any emoji for your button.