1.2.1 • Published 2 years ago
create-gartic-game v1.2.1
create-gartic-game
A function to create Gartic Phone games and retrieve the URL.
Parameters
// The player's username. Defaults to `CoolPlayer{XXXX}`.
username?: string,
// A number between 10 and 45 representing the player's avatar.
// Will throw an error if the avatar doesn't exist.
// Defaults to a random avatar.
avatar?: number,
// The language of the room. Defaults to `en`.
language?: string,
// A UUIDv6 to be used to reference the player. Defaults to a randomly generated UUIDv6.
uuid?: string,
// Minimum timeout before disconnecting the client (in seconds). Defaults to `5`.
timeout?: number,
How to use
import createGarticGame from 'create-gartic-game';
// OR const createGarticGame = require('create-gartic-game');
const URL = createGarticGame({
avatar: 10,
language: 'en',
timeout: 5,
username: 'CoolPlayer1234',
uuid: 'c71757c4-5177-454f-8ec5-d9c017b4d818',
});
console.log('Join the game at:', URL);