Skip to content

ConfigUtil

Util library to assist with creating and manipulating configs

Config

{
VoiceTypes: { VoiceType },
VoiceEnabled: boolean?,
}

Voice Effect

{
Object: Instance,
Properties: {
[string]: any
}
}

Voice Type

{
Type: string,
VoiceEffects: { VoiceEffect }?
}

ConfigUtil.ReconcileConfig(ConfigPrototype)

Takes in the given config prototype and returns a reconciled version

Parameters:
- ConfigPrototype: The config data to reconcile against the default config

Returns:
- Config: A reconciled version of ConfigPrototype


ConfigUtil.CreateVoiceType(ModuleName, VoiceEffects)

Parameters:
- ModuleName: a name to refer to a module inside of TeamChat.VoiceTypes
- VoiceEffects: an optional field to put the voice effects for this module

Returns:
- VoiceType: The created voice type


ConfigUtil.GetDefaultConfig()

Returns:
- Config: The Default Config used when reconciling


ConfigUtil.CreateVoiceEffect(EffectName, EffectProperties)

Creates a VoiceEffect Object for use in a config

Parameters:
- EffectName: The name of the effect you want to create. Must refer to a valid effect name! refer to VoiceEffectEnum for more info.
- EffectProperties: A list of properties to apply to the effect upon creation. Invalid properties will error, but won't halt the effect creation process

Returns:
- VoiceEffect: A VoiceEffect object


ConfigUtil.GetVoiceTypeEnum()

Returns:
- Enum: a frozen version of the VoiceTypeEnum