added more strings
This commit is contained in:
34
dist/lang.js
vendored
34
dist/lang.js
vendored
@@ -105,7 +105,27 @@ const LANG = {
|
||||
create: 'A queue for teams of {teamsize} has been created',
|
||||
close: 'Queue has been closed',
|
||||
join: 'Joined the queue',
|
||||
leave: 'Left the queue'
|
||||
leave: 'Left the queue',
|
||||
team: {
|
||||
embed: true,
|
||||
title: 'Team',
|
||||
description: '{team}'
|
||||
},
|
||||
queue: {
|
||||
embed: true,
|
||||
title: 'Active Queue',
|
||||
fields: [
|
||||
{
|
||||
name: 'Team Size',
|
||||
value: '{teamsize}'
|
||||
},
|
||||
{
|
||||
name: 'Players Joined',
|
||||
value: '{playercount}'
|
||||
}
|
||||
],
|
||||
footer: 'type `/join`'
|
||||
}
|
||||
},
|
||||
api: {
|
||||
player: {
|
||||
@@ -160,6 +180,7 @@ exports.setLang = setLang;
|
||||
/**
|
||||
* reads language json (just strings)
|
||||
* @param id ex: discord.error.noActiveQueue
|
||||
* @param args list of key/value pairs to represent template values
|
||||
* @returns language value, defaults to `id` parameter
|
||||
*/
|
||||
function get(id, args = {}) {
|
||||
@@ -183,10 +204,13 @@ exports.get = get;
|
||||
/**
|
||||
* reads language json as an object (could be embed or just string)
|
||||
* @param id ex: discord.error.noActiveQueue
|
||||
* @param args list of key/value pairs to represent template values
|
||||
* @param otherOptions values to be passed through to the return value
|
||||
* @returns language value, defaults to `id` parameter
|
||||
*/
|
||||
function getEmbed(id, args = {}) {
|
||||
function getEmbed(id, args = {}, otherOptions = {}) {
|
||||
const embedData = {
|
||||
...otherOptions,
|
||||
embeds: []
|
||||
};
|
||||
const keySpl = id.split('.').map(k => k.trim()).filter(k => k);
|
||||
@@ -199,9 +223,8 @@ function getEmbed(id, args = {}) {
|
||||
break;
|
||||
}
|
||||
if (found.embed === true) {
|
||||
const embedObj = found, { content } = embedObj, embed = embedObjEmbed(embedObj, args), embedData = {
|
||||
embeds: [embed]
|
||||
};
|
||||
const embedObj = found, { content } = embedObj, embed = embedObjEmbed(embedObj, args);
|
||||
embedData.embeds.push(embed);
|
||||
if (content !== undefined)
|
||||
embedData.content = content;
|
||||
return embedData;
|
||||
@@ -214,3 +237,4 @@ function getEmbed(id, args = {}) {
|
||||
return embedData;
|
||||
}
|
||||
exports.getEmbed = getEmbed;
|
||||
debugger;
|
||||
|
||||
Reference in New Issue
Block a user