Skip to main content

Connect Four

Let your users play Connect Four against each other!

Connect Four
Let your users play Connect Four against each other!
This module is open-source.
This module creates one top-level Slash-Command on your server.
This module has no available configuration files.
This module is being actively used on over 2.6K other servers on SCNX.
This module is included for free in every plan. Learn more about prices.

Features

Connect Four is a really old game - you can find more information about it on Wikipedia. The game is played on a 7x6 field, where two players take turns dropping their tokens into the field. The first player to connect four of their tokens in a row wins the game.

Setup

The setup is really simple - just enable the module in your SCNX dashboard and you're good to go!

Usage

A Connect Four game can be started using the slash command /connect-four - you can find out more about the command in the Commands section below.

Once a user runs the command, the targeted user has to accept the invitation to play a game against you using the button on the message. If they accept within two minutes, the game starts.

After accepting, your bot sends a message with the game field and buttons numbered from 1 to the game field size. Both of you now take turns in dropping your tokens into the field by clicking on the buttons. The tokens will fall to the lowest possible position in the column you selected, just like real Connect Four.

The first player that gets four rectangles of their color in any row wins the game. The rectangles can be horizontal, vertical or diagonal.

Commands

Understand the documentation
In these docs, name:<Type> is an option of a slash-command with name name and the type Type. Options that not required, are described as [name:<Type>]. If the action of a command is vastly different between required and not-required options, we might list them separately.
Examples
  • /moderate ban user:<Member>: This command (/moderate ban) has an required option with the name "user" that only accepts one member as a value.
  • /moderate ban victim:<Member> reason:<Text>: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value and another required option with the name "reason" that accepts any text as an value.
  • /moderate ban victim:<Member> reason:<Text> [proof:<Attachment>]: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value, another required option with the name "reason" that accepts any text as an value and a not-required option with the name "proof" which allows one attachment as its value.
CommandDescription
/connect-fourThis command starts a Connect Four game against the specified user. You can also use the field_size option to define the width and height of the game field - it is 7 by default, but you can enter any value from 4 to 10.