Interaction Prompts

Register core managed prompts, remember, these are client-sided.

CreatePromptGroup

Create a group of prompts that can be enabled/disabled.

Parameter
Required
Type
Description

prompts

List

A list of prompts to create the prompt group for

local promptGroupId = TMC.Functions.CreatePromptGroup({
    {
        Id = 'prompt_internal_name',
        Complete = function()
            -- function to call when user selects item
        end,
        Title = '', -- The title of the prompt
        Description = '', -- Optional description text
        Icon = '', -- The font-awesome icon I.e. 'fas fa-circle'
        AutoComplete = false, -- Optional, auto-complete the prompt selection if only 1 prompt is available
    }
})

DeletePromptGroup

Remove a prompt group and delete it.

Parameter
Required
Type
Description

promptGroupId

Int

The prompt group id

ShowPromptGroup

Enable interaction and visibility of a prompt group

Parameter
Required
Type
Description

promptGroupId

Int

The prompt group Id to enable

promptRestrictions

List

A list of prompts to enable if you don't want to enable them all

forceUpdate

Boolean

If we should force an update when the prompt group is already enabled. I.e. to enable a new restricted set of prompts

HidePromptGroup

Hides all prompts from a group

Parameter
Required
Type
Description

promptGroupId

Int

The prompt group Id

Full Example:

This is a full example of the features available with the PromptGroups

Last updated