UNPKG

@gameroom/cli

Version:

A command line tool for Gameroom

14 lines (12 loc) 380 B
const { config } = require('@gameroom/kit'), { setToken } = config, { models: { Selection, Token } } = require('../emporium') module.exports = async (options) => { if (options && options.token) { setToken(options.token || options._parents.gameroom.token) } else { let tokens = await Token.get() if (tokens.length > 0) setToken(tokens[0].token) } return }