Skip to content

drawName

Jason Godesky edited this page Jul 17, 2026 · 1 revision

drawName is a wrapper that fetches the specified table, draws the first result from it, and returns the name from that result.

Parameters

uuid: string

The UUID of the roll table you want to roll on (should begin with RollTable.).

Returns

A Promise that resolves either the name of the first result drawn, or null if something went awry (e.g., the table could not be found, no results were drawn, or the result drawn did not have a name).

Examples

import { drawName } from '@revolutionarygamesco/common-foundryvtt'

await drawName('RollTable.1111111111111111') // 'Dread Gazebo'

Clone this wiki locally