Erebot latest-0.6.0-74-g691fc3f documentation

GoF module

«  CtcpResponder module   ::   Contents   ::   Helper module  »

GoF module


This module provides provides an IRC implementation of Days of Wonder’s Gang of Four.



This module provides several configuration options.

Options for \Erebot\Module\GoF
Name Type Default value Description
trigger_create string “gof” The command to use to start or end a Gang of Four game.
limit integer 100 The game will stop after this limit is reached. The . player(s) with the lowest score win the game.
pause_delay integer 5 How many seconds does the bot wait after a round ends before it starts the next round.
start_delay integer 20 How many seconds does the bot wait after enough players have joined the game before the game actually starts.
trigger_show_cards string “ca” The command to use to show how many cards each player has in his hand.
trigger_show_discard string “cd” The command to use to show the last discarded combo.
trigger_choose string “ch” The command to use to choose a card to give to the loser of the previous round.
trigger_join string “jo” The command to use to join a game after it has been created.
trigger_show_order string “od” The command to use to show playing order.
trigger_pass string “pa” The command to use to pass a turn.
trigger_play string “pl” The command to use to play a combination of cards. [1]
trigger_show_scores string “sc” The command to use to display the current scores.
trigger_show_time string “ti” The command to use to show for how long a game has been running.
trigger_show_turn string “tu” The command to use to show whose player’s turn it is.


All triggers should be written without any prefixes. Moreover, triggers should only contain alphanumeric characters.


Valid combinations include:

  • a single card, eg. g1
  • a pair, eg. g1y1
  • three of a kind, eg. g1y1r1
  • a straight, eg. m1r2y3g4r5
  • a flush, eg. g1g1g2g2g7
  • a full house, eg. g1y1r1g2g2
  • a straight flush, eg. g1g2g3g4g5
  • a gang, eg. g1g1y1y1 for the lowest possible gang (a gang of four), up to g1g1y1y1r1r1m1 for the highest gang (a gang of seven).

See the official rules on Days of Wonder’s website for more information on when you may play a given combination.


Here, we enable the Gang of Four module at the general configuration level. Therefore, the game will be available on all networks/servers/channels. Of course, you can use a more restrictive configuration file if it suits your needs better.

<?xml version="1.0"?>

    <!-- Other modules ignored for clarity. -->

      Configure the module:
      - the game will be started using the "!gangof4" command.
      - the game will start 2 minutes (120 seconds) after 3 players
        join it (to give time for a fourth player to join the game).
    <module name="\Erebot\Module\GoF">
      <param name="trigger_create" value="gangof4" />
      <param name="start_delay"    value="120" />


This section assumes default values are used for all triggers. Please refer to configuration options for more information on how to customize triggers.

Also, knowledge of the rules for the Gang of Four game is assumed. The full rules for the game can be found (in multiple languages) on Days of Wonder’s website.

Provided commands

This module provides the following commands:

Commands provided by \Erebot\Module\GoF
Command Description
!gof Start a new Gang of Four game.
!gof cancel or !gof end or !gof off or !gof stop Stop a currently running Gang of Four game. Can only be used by the person who started the game in the first place.
ca Display the number of remaining cards in each player’s hand.
cd Display the last played (and thus discarded) card.
ch card Choose a card to give to the loser of the previous round. Can only be used at the end of a round by the winner of the previous round.
jo Join a currently running Uno game.
od Display playing order.
pa Pass instead of playing.
pl combo Play the given combo of cards (see mnemonics below for the syntax used). Eg. pl g1y1 to play a pair of 1s, containing a “Green 1” and a “Yellow 1”.
sc Display the score of each player involved in the current game.
ti Display information on how long the current game has been running for.
tu Display the name of the player whose turn it is to play.

Mnemonics for cards

The general format used to refer to cards is the first letter of the card’s color (in english) followed by the card’s figure.

The following colors are available:

  • green
  • yellow
  • red
  • multi

The following figures are available:

  • Numbers from 1 to 10 (inclusive).
  • Phoenixes.
  • Dragon.

The following table lists a few examples of valid mnemnics with the full name of the card they refer to:

Valid mnemonics for cards
Mnemonic Actual card
g1 “Green 1”
m1 “Multicolored 1”
r10 “Red 10”
gp “Green Phoenix”
yp “Yellow Phoenix”
rd “Red Dragon”

Not all combinations of colors and figures are valid. In particular, there is only one multicolored figure, one red dragon, a green and a yellow phoenix.

«  CtcpResponder module   ::   Contents   ::   Helper module  »