# Locales
Locales used by Chariot.js for internal messages out of the box can be overriden using following Object strucutre.
# Data Injection
Default variables provided internally by Chariot.js can be injected into custom strings as seen fit by using {variableName}
as a substitution string. The exact variable names used for data injection can be found down below.
# Properties
Parameter | Type | Optional | Variables | Description |
---|---|---|---|---|
missingPermissions | String | command , missingPermissions | Message sent if the bot has missing or insufficient permissions. | |
userPermissions | Object | missingUserPermissions | Embed object sent if the user has insufficient permissions. | |
owner | String | No Variables | Message sent on illegal owner level command execution. | |
nsfw | String | command | Message sent if an NSFW command was used illegally. | |
cooldown | String | command , timeLeftFormatted | Message sent if a command was run while on cooldown. |
# Defaults
# missingPermissions Default Locale
"Can't run command **{command}** because I lack following permissions: **{missingPermissions}**"
# userPermissions Default Locale
{ title: 'Insufficient Permissions!', description: 'You lack following permissions to use this command: **{missingUserPermissions}**' }
# owner Default Locale
"Insufficient permissions!"
# nsfw Default Locale
"Command **{command}** is only available in NSFW channels!"
# cooldown Default Locale
"Please wait **{timeLeftFormatted}** before using **{command}** again"
# Example
A pretty easy and straight forward customLocales
object could be structured as follows:
/* ... */
customLocales: {
missingPermissions: 'Command **{command}** requires following permissions: **{missingPermissions}**',
owner: 'You should not be playing around with this!',
cooldown: 'Just wait **{timeLeftFormatted}** before spamming **{command}** yet again ...',
nsfw: '**{command}** is an NSFW command and cannot be used here.',
userPermissions: {
title: 'Hold up ...',
description: 'I need you to make sure you have following permissions before using this command: **{missingUserPermissions}**',
}
}
/* ... */