Skip to content

Commit

Permalink
fix: plugin-language
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Feb 10, 2022
1 parent 08fc10b commit d8a098a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-language/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gcommands/plugin-language",
"version": "1.0.2",
"version": "1.0.3",
"description": "Extend default discord.js events for GCommands",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-language/src/utils/LanguageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class LanguageManager {
private static getLanguage(lang: { defaultLanguage?: string; languageText?: object; }, language: string, name: string) {
const json = lang?.languageText;

return json[language][name];
if (json[language][name]) return json[language][name];
else return json[lang.defaultLanguage][name];
}
}

0 comments on commit d8a098a

Please sign in to comment.