Games & fun · Step
Check for a line
Whether someone has a line of pieces in a row, a column or a diagonal (4 for Connect 4, 3 for Tic-tac-toe), or the board is full: a draw.
grid.check
In a flow
“When a button is clicked, check for a line.”
Drop in a column → Check for a line 4 → If Won → End a match.
What it does
Whether someone has a line of pieces in a row, a column or a diagonal (4 for Connect 4, 3 for Tic-tac-toe), or the board is full: a draw. It's a step: it runs when the white wire reaches it, then the flow carries on from its Then pin. It gives 6 values later steps can use. Find it under Games & fun in the palette.
When to use it
Use it for games and fun: whether someone has a line of pieces in a row, a column or a diagonal (4 for Connect 4, 3 for Tic-tac-toe), or the board is full: a draw.
When not to
If nothing should change in Discord, a value node or a check is lighter.
Typical wiring
Sockets: settings you can wire
- Match Text
-
Which match: the message it's played on, like {message.id} on a button, or Sent message's id.
What goes there: Type it in the side panel, or wire in text. e.g. Hello there
If it's empty: Optional. Left empty and unwired, it uses {message.id}.
Connects fromA member's variablesAccept applicationAdd a Notion pageAdd a Trello cardAdd an emojiAdd to number in objectAdd up timesAdd working daysand 844 more
- Line of Number
-
How many in a row win.
What goes there: Type it in the side panel, or wire in a number. e.g. 42
If it's empty: Optional. Left empty and unwired, it uses 4.
Connects fromA member's variablesAccept applicationActive membersAddAdd a forum tagAdd a labelAdd a row to a Google SheetAdd a staff noteand 501 more
Values it gives
- Won Yes / no
-
On when there's a line. e.g. on
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd a forum tagAdd onboarding questionAdd to a counterAlarms that are dueAndAutoMod: Discord's word listsBluesky latest postBoard as emojiand 572 more
- Winner Member
-
Whose line it is. e.g. @Sam
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toA member's variablesAdd a labelAdd a staff noteAdd answer to formAdd to a counterAdd to a leaderboardAdd to threadAdd to ticketand 647 more
- Winner's mark Text
-
Their piece. e.g. 🔴
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccept applicationAdd a forum tagAdd a labelAdd a Notion pageAdd a row to a Google SheetAdd a staff noteAdd a stickerAdd a Trello cardand 577 more
- Line squares List
-
The squares of the line, numbered from 1. e.g. [1, 2, 3, 4]
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd onboarding questionAdd to listAdd up timesAutoMod: add or remove allowed wordsAutoMod: add or remove wordsAutoMod: block wordsBar chartBest by a fieldand 88 more
- Draw Yes / no
-
On when the board is full and nobody has a line. e.g. off
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd a forum tagAdd onboarding questionAdd to a counterAlarms that are dueAndAutoMod: Discord's word listsBluesky latest postBoard as emojiand 572 more
- Over Yes / no
-
On for a win or a draw. e.g. on
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd a forum tagAdd onboarding questionAdd to a counterAlarms that are dueAndAutoMod: Discord's word listsBluesky latest postBoard as emojiand 572 more