This is the documentation for all game classes that implemented with discord.js.
- DjsGameWrapper
- DjsBigTwo
- DjsBullsAndCows
- DjsFinalCode
- DjsFlipTrip
- DjsGomoku
- DjsLightsUp
- DjsTicTacToe
- DjsTofe
The discord.js wrapper for all games.
new DjsGameWrapper(djsGameWrapperOptions);
parameter | type | default | description |
---|---|---|---|
djsGameWrapperOptions | djsGameWrapperOptions | required | Options for the wrapper |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: GameStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Bulls and Cows, discord.js version.
new DjsBigTwo(djsBigTwoOptions);
parameter | type | default | description |
---|---|---|---|
djsBigTwoOptions | djsBigTwoOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: BigTwoStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Bulls and Cows, discord.js version.
new DjsBullsAndCows(djsBullsAndCowsOptions);
parameter | type | default | description |
---|---|---|---|
djsBullsAndCowsOptions | djsBullsAndCowsOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- Whether the game is in hard mode
- Type: boolean
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: BullsAndCowsStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Final Code, discord.js version.
new DjsFinalCode(djsFinalCodeOptions);
parameter | type | default | description |
---|---|---|---|
djsFinalCodeOptions | djsFinalCodeOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: FinalCodeStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Flip Trip, discord.js version.
new DjsFlipTrip(djsFlipTripOptions);
parameter | type | default | description |
---|---|---|---|
djsFlipTripOptions | DjsFlipTripOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: FlipTripStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Gomoku, discord.js version.
new DjsGomoku(djsGomokuOptions);
parameter | type | default | description |
---|---|---|---|
djsGomokuOptions | DjsGomokuOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: GomokuStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Lights-up, discord.js version.
new DjsLightsUp(djsLightsUpOptions);
parameter | type | default | description |
---|---|---|---|
djsLightsUpOptions | DjsLightsUpOptions | required | Options for the game |
- Whether any player has asked for the answer
- Type: boolean
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: LightsUpStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for Tic-tac-toe, discord.js version.
new DjsTicTacToe(djsTicTacToeOptions);
parameter | type | default | description |
---|---|---|---|
djsTicTacToeOptions | DjsTicTacToeOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The controller buttons
- Type: MessageActionRow
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: TicTacToeStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>
extends DjsGameWrapper
The class for 2048, discord.js version.
new DjsTofe(djsTofeOptions);
parameter | type | default | description |
---|---|---|---|
djsTofeOptions | djsTofeOptions | required | Options for the game |
- The client that instantiated this
- Type: Client
- The subordinate message, or the main message if a subordinate message does not exist in a game
- Type: ?Message
- The loser of the game
- Type: Player | null
- The message where most of the information are shown
- Type: ?Message
- The source that instantiated this
- Type: CommandInteraction | Message
- The display strings
- Type: TofeStrings
- How long to consider a player idle (in milliseconds)
- Type: number
- The winner of the game
- Type: Player | null
- Sends a conclusion message of the game
- Returns: Promise<void>
- Initializes the game
- Returns: Promise<void>
- Gets the content to show on the concluding message
- Returns: string
- Starts running the game
- Returns: Promise<void>