Skip to content

Commit

Permalink
Update example.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Sep 16, 2024
1 parent 361f390 commit 98ccd55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ const language = "en_pr";
console.log((await languages(language).slash_commands.ping).name);

// existent, should use en_pr
console.log((await languages(language).standard.textEvents).messageDeleted.title);
console.log(
(await languages(language).standard.textEvents).messageDeleted.title
);

// non existent in either selected language or fallback language
try {
await languages(language).doesNotExist.abc;
await languages(language).doesNotExist.abc;
} catch (error) {
console.error(error);
}
console.error(error);
}

0 comments on commit 98ccd55

Please sign in to comment.