Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

Hangman

by Limon
Run Hangman word games for your game server community through Takaro. Hangman lets players host, join, guess letters, reveal progress, and compete for rewards using chat commands.
Use this module to:
  • Let players create Hangman games with secret words or phrases.
  • Allow multiple players to join and guess.
  • Track progress, wrong guesses, and game status.
  • Connect participation or wins to the server economy.
  • Give admins controls for hosting and moderation.
Good fit for communities that want social minigames, chat-based events, and low-friction player engagement between larger server activities.

Module details

A classic Hangman game where players guess letters to reveal a hidden word. This interactive module adds a fun, competitive element to your server with full economy integration.

Key Functionality

  • Game Hosting: Players can create new Hangman games by specifying a secret word or phrase for others to guess.
  • Player Participation: Multiple players can join ongoing games, creating a social, competitive experience.
  • Letter Guessing: Players take turns guessing letters or attempting the full word, with visual feedback after each guess.
  • Progressive Difficulty: Wrong guesses accumulate toward a maximum limit, creating tension as the game progresses.
  • Economic Integration: Full support for your server's economy with:
    • Hosting fees for creating games
    • Entry fees for joining games
    • Optional costs per guess
    • Currency rewards for winners
  • Game Management: Commands for checking game status, revealing answers, or canceling games as needed.

How to Use

  1. Configuration:
    • maxWrongGuesses: Set the number of incorrect guesses allowed before the game ends.
    • minWordLength and maxWordLength: Define valid word length parameters.
    • entryFee: Cost for players to join a game.
    • hostingFee: Cost to start a new game.
    • guessPrice: Optional cost per letter guess.
    • winReward: Currency awarded to successful players.
    • hostReward: Currency awarded to hosts when no player solves the puzzle.
    • gameTimeout: Maximum duration a game can run.
  2. Commands:
    • /hangmanstart [word]: Create a new game or start a waiting game.
    • /hangmanjoin: Join an existing game that hasn't started.
    • /hangmanguess [letter/word]: Make a guess during an active game.
    • /hangmanstatus: Check the current state of the game.
    • /hangmanreveal: Reveal the answer and end the game (host/admin only).
    • /hangmancancel: Cancel the current game (host/admin only).
  3. Permissions:
    • HANGMAN_HOST: Allows players to create and host games.
    • HANGMAN_PLAY: Allows players to join games and make guesses.
    • HANGMAN_ADMIN: Grants administrative control over all games.

Game Flow

  1. A player with hosting permissions creates a new game with a secret word.
  2. Other players join the waiting game.
  3. The host starts the game when enough players have joined.
  4. Players take turns guessing letters or the complete word.
  5. With each guess, the game displays the current word state and remaining guesses.
  6. The game ends when:
    • A player correctly guesses the word (player wins the pot)
    • Players reach the maximum wrong guesses (host wins the pot)
    • An admin or host cancels or reveals the game

Important Considerations

  • Configuring appropriate fees and rewards helps balance your server economy.
  • The word validation ensures fair gameplay (letters and spaces only).
  • Players cannot join games that have already started.
  • The host cannot participate in guessing since they know the word.
  • Currency features require the economy system to be enabled.
communityTakaro v0.0.21
(2 versions available)

Components Overview

1
config
6
commands
0
hooks
0
Cron Jobs
1
functions
3
permissions

New Module: Hangman

NEW
August 6, 2025
Updated to version latest. Added 6 commands: hangmanStart, hangmanJoin, hangmanGuess, hangmanStatus, hangmanReveal, hangmanCancel. Added 1 function: utils. New permissions: HANGMAN_HOST, HANGMAN_PLAY, HANGMAN_ADMIN. New configuration options: maxWrongGuesses, winReward, hostReward, gameTimeout, minWordLength, maxWordLength, entryFee, guessPrice, hostingFee.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (9)

maxWrongGuessesnumber
maxWrongGuesses

Maximum number of wrong guesses allowed before the game ends.

Default: 6
Constraints: min: 1, max: 100
winRewardnumber
winReward

Amount of currency to reward the player who guesses the word correctly.

Default: 100
hostRewardnumber
hostReward

Amount of currency to reward the player who hosts the game if nobody guesses the word.

Default: 50
gameTimeoutnumberduration
gameTimeout

Maximum time a game can run before automatically ending.

Default: 60000
minWordLengthnumber
minWordLength

Minimum length of words that can be used in the game.

Default: 4
Constraints: min: 3
maxWordLengthnumber
maxWordLength

Maximum length of words that can be used in the game.

Default: 15
Constraints: min: 5
entryFeenumber
entryFee

Cost to join a Hangman game

Default: 10
guessPricenumber
guessPrice

Cost per letter guess

Default: 0
hostingFeenumber
hostingFee

Cost to create and host a new Hangman game

Default: 20

UI Schema

No UI schema defined. Configuration form will use default rendering.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Commands (6)

These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.

hangmanStart

/hangmanstartTrigger Command

Description

No help text available

Arguments (1)

word
stringPosition 0
Help: The word or phrase players will try to guess.
Default: ""

Function Implementation

hangmanStart Function

JAVASCRIPT

Usage Example

Player types: /hangmanstart <word>

hangmanJoin

/hangmanjoinTrigger Command

Description

No help text available

Function Implementation

hangmanJoin Function

JAVASCRIPT

Usage Example

Player types: /hangmanjoin

hangmanGuess

/hangmanguessTrigger Command

Description

No help text available

Arguments (1)

letter
stringPosition 0
Help: The letter you want to guess.
Default: ""

Function Implementation

hangmanGuess Function

JAVASCRIPT

Usage Example

Player types: /hangmanguess <letter>

hangmanStatus

/hangmanstatusTrigger Command

Description

No help text available

Function Implementation

hangmanStatus Function

JAVASCRIPT

Usage Example

Player types: /hangmanstatus

hangmanReveal

/hangmanrevealTrigger Command

Description

No help text available

Function Implementation

hangmanReveal Function

JAVASCRIPT

Usage Example

Player types: /hangmanreveal

hangmanCancel

/hangmancancelTrigger Command

Description

No help text available

Function Implementation

hangmanCancel Function

JAVASCRIPT

Usage Example

Player types: /hangmancancel

About Module Commands

Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

utils

functionReusable Component

Function Implementation

utils Function

JAVASCRIPT

Import Usage

Import: import { utils } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.

Permissions (3)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

3 permissions

Hangman Admin

HANGMAN_ADMINPermission Key
Description

Allows the player to manage and control running Hangman games.

Permission Details
Full Key:HANGMAN_ADMIN
Can Have Count:No
Category:General

Host Hangman Game

HANGMAN_HOSTPermission Key
Description

Allows the player to start and host Hangman games.

Permission Details
Full Key:HANGMAN_HOST
Can Have Count:No
Category:General

Play Hangman

HANGMAN_PLAYPermission Key
Description

Allows the player to join and make guesses in Hangman games.

Permission Details
Full Key:HANGMAN_PLAY
Can Have Count:No
Category:General

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.