Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #52 from greencoast-studios/develop
Browse files Browse the repository at this point in the history
Version 2.1.1
  • Loading branch information
moonstar-x authored Jan 10, 2022
2 parents 7d0f0bb + f4a2605 commit 6782f89
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@greencoast/discord.js-extended",
"version": "2.1.0",
"version": "2.1.1",
"description": "An utility to facilitate the repetitive tasks when creating discord bots. Used by Greencoast Studios.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions src/classes/command/default/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ export const Slash = {
HelpSlashCommand,
SetLocaleSlashCommand
};

export {
HelpRegularCommand,
SetLocaleRegularCommand,

HelpSlashCommand,
SetLocaleSlashCommand
};
8 changes: 4 additions & 4 deletions src/classes/locale/GuildLocalizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class GuildLocalizer {
/**
* The main localizer for this guild localizer.
* @type {Localizer}
* @memberof {GuildLocalizer}
* @memberof GuildLocalizer
*/
public readonly localizer: Localizer;

/**
* The guild that corresponds to this guild localizer.
* @type {Discord.Guild}
* @memberof {GuildLocalizer}
* @memberof GuildLocalizer
*/
public readonly guild: Discord.Guild;

Expand All @@ -25,15 +25,15 @@ class GuildLocalizer {
* data provider.
* @type {string}
* @default `locale`
* @memberof {GuildLocalizer}
* @memberof GuildLocalizer
*/
public readonly dataProviderKey: string;

/**
* The current locale set for the guild. Do not update this value manually, instead use
* the `updateLocale()` method.
* @type {string}
* @memberof {GuildLocalizer}
* @memberof GuildLocalizer
*/
public locale: string;

Expand Down
10 changes: 6 additions & 4 deletions src/classes/locale/Localizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Localizer {
*
* The following is an example of how to structure this object:
*
* ```js
* en: {
* 'message.test.hello': 'Hello',
* 'message.test.bye': 'Bye',
Expand All @@ -42,8 +43,9 @@ class Localizer {
* 'message.test.bye': 'Au revoir',
* 'message.test.with_value': 'Bonjour {name}!'
* }
* ```
* @type {Record<string, Record<string, string>>}
* @memberof {Localizer}
* @memberof Localizer
*/
public readonly localeStrings: Record<string, Record<string, string>>;

Expand All @@ -52,21 +54,21 @@ class Localizer {
* client's data provider. You should set a data provider before setting this up so
* the guild's locale can be saved persistently.
* @type {string}
* @memberof {Localizer}
* @memberof Localizer
*/
public readonly defaultLocale: string;

/**
* The options for this localizer.
* @type {LocalizerOptions}
* @memberof {Localizer}
* @memberof Localizer
*/
public readonly options: LocalizerOptions;

/**
* The {@link GuildLocalizer}s for each guild.
* @type {Discord.Collection<Discord.Snowflake, GuildLocalizer>}
* @memberof {Localizer}
* @memberof Localizer
*/
public readonly guildLocalizers: Discord.Collection<Discord.Snowflake, GuildLocalizer>;

Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/LocalizerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface LocalizerOptions {
*
* The following is an example of how to structure this object:
*
* ```js
* en: {
* 'message.test.hello': 'Hello',
* 'message.test.bye': 'Bye',
Expand All @@ -25,6 +26,7 @@ interface LocalizerOptions {
* 'message.test.bye': 'Au revoir',
* 'message.test.with_value': 'Bonjour {name}!'
* }
* ```
*/
localeStrings: Record<string, Record<string, string>>,

Expand Down

0 comments on commit 6782f89

Please sign in to comment.