Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Settings rewrite #471

Merged
merged 64 commits into from
Nov 5, 2018
Merged

Settings rewrite #471

merged 64 commits into from
Nov 5, 2018

Conversation

kyranet
Copy link
Contributor

@kyranet kyranet commented Nov 1, 2018

Description of the PR

This PR changes the way Settings work from almost the very ground up. It's an all-ways breaking change for everything that relies on SettingsGateway (in other words, this breaks almost every single bot that relies on SettingsGateway).

For starters, Settings will not longer be objects, but (nested) extended maps.

Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)

Added:

  • Added Gateway#create and Gateway#acquire.
  • Added SETTING_GATEWAY_CHOOSE_KEY and SETTING_GATEWAY_UNCONFIGURABLE_FOLDER i18n keys into en-US.
  • Added SettingsFolder, with the common operations (update, reset...) for better OOP compliancy.

Changed:

  • Modified Schema#defaults type from Object literal to a SettingsFolder instance.
  • Modified Schema#defaults to be a property instead of a getter.
  • Modified Gateway#get to take only id. For get or create, use Gateway#acquire instead.
  • Modified Settings#{update,reset} output to return { key: string, value: any, piece: Schema | SchemaPiece } instead of { data: [string, any], piece: Schema | SchemaPiece } in the updated field.
  • Modified Settings completely, they're not longer dictionaries but (nested) SettingsFolders.
  • Modified Util.resolveGuild to also resolve members.
  • Modified initialization order to prepare Schedule before initializing pieces.
  • Modified Schema#get overload to not check safely to reduce overhead.
  • Modified Settings#sync to force sync if the entry was not synchronized.
  • Renamed Gateway#syncQueue to Gateway#syncMap, changing also its type from Collection<string, Promise<Settings>> to WeakMap<string,- Promise<Settings>>.
  • Renamed GatewayDriver#type to GatewayDriver#name.
  • Renamed SettingsUpdateOptions.{action,arrayPosition,avoidUnconfigurable} to SettingsUpdateOptions.{arrayAction,arrayIndex,onlyConfigurable}.

Removed:

  • Removed Gateway#defaults. Refer to Schema#defaults instead.

Semver Classification

  • This PR only includes documentation or non-code changes.
  • This PR fixes a bug and does not change the (intended) framework interface.
  • This PR adds methods or properties to the framework interface.
  • This PR removes or renames methods or properties in the framework interface.

@kyranet kyranet added Type: Enhancement Issues and PRs related to feature enhancement. Meta: Refactor Issues and PRs related to refactors. Status: WIP Issues and PRs that are still a work in progress. SEM: Major PRs that contain breaking changes and should be released in the next major version. Type: Caching Issues and PRs related to caching. Mod: SettingsGateway Issues and PRs related to SettingsGateway. labels Nov 1, 2018
kyranet added a commit that referenced this pull request Nov 11, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Nov 18, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Nov 18, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (dirigeants#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (dirigeants#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (dirigeants#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (dirigeants#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (dirigeants#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Nov 20, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Nov 20, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Nov 20, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Nov 20, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Nov 21, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Nov 21, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Nov 21, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Nov 21, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Nov 21, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Nov 21, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Dec 4, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Dec 4, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Dec 11, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Dec 11, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (dirigeants#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (dirigeants#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (dirigeants#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (dirigeants#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (dirigeants#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Dec 11, 2018
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
UnseenFaith pushed a commit to UnseenFaith/klasa that referenced this pull request Dec 11, 2018
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (dirigeants#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (dirigeants#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (dirigeants#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (dirigeants#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (dirigeants#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Feb 11, 2019
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Feb 11, 2019
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Feb 23, 2019
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Feb 23, 2019
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Feb 24, 2019
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Feb 24, 2019
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Mar 8, 2019
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Mar 8, 2019
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
kyranet added a commit that referenced this pull request Apr 17, 2019
* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas
kyranet added a commit that referenced this pull request Apr 17, 2019
* refactor: Convert GatewayDriver into a Collection<string, Gateway> (#467)

* refactor: Convert GatewayDriver into a Collection<string, Gateway>

* fix: Better error message for gateway existence in register

Co-Authored-By: kyranet <kyradiscord@gmail.com>

* refactor: Upgrade API for Settings#update (#426)

* refactor: No more _update

* cleanup: More re-organization

* src: More refactors

* Settings#{list,resolveString} -> Settings#display

* style: Rename constant name

* refactor: Re-add Conf#check and reduce duplicated code in Settings#reset

* fix: _resolveUpdateOverloads not parsing reset args correctly

* fix: Synchronize the Settings entry on update or reset instead of returning wrong results

* typings: Fixed QB types and updated everything

* docs: Added missing jsdocs and refactored Settings#get

* fix: conf and userconf always throwing on empty values

* fix: Better Schema#get

* fix: Settings#show using Map[key] instead of Map#get(key)

* fix: Settings#_resolveUpdateOverloads not checking for the lack of a key

* fix: conf command not passing all args for check

* fix: Fixed multiple things

* docs: Update guides to reflect latest changes

* pr: Update changelog

* fix: Collection not being destructured from discord.js

Now it's the time when I run and hide for such a silly mistake.

* Settings rewrite (#471)

* wip: Settings rewrite

* design: Chain SettingsFolder#get instead of recursing, remove '*' wildcard

* refactor: Made SettingsFolder#get use Array#reduce

* src: Add Settings#init

* src: Added SettingsFolder#display

* src: Remove Settings and all traces of it

* src: Update Gateway, move SettingsFolder#existenceStatus to Settings

* docs: Documented all methods and properties of Settings and SettingsFolder

* naming: Gateway#type -> Gateway#name

* src: Change all occurrences of Settings[key] to Settings.get(key)

* src: SettingsUpdateOptions#{action|avoidUnconfigurable} -> {arrayAction|onlyConfigurable}

* src: guildSettings[key] -> guildSettings.get(key)

* typings: GatewayStorage#type -> GatewayStorage#name

* refactor: Faster Schema#get

* typings: Fix Settings class typings

* typings: Iterable -> IterableIterator

* docs: Fixed util docs

* fix: Use Map#call instead of inherited SettingsFolder#get and Schema

* fix: Settings#init deepCloning the wrong value

* fix: KlasaGuild#language using Settings[key] instead of Settings.get(key)

* inspection: Make Settings#{id|base} non-enumerable

* fix: Sandbox Schema#get to mimic previous functionality

* fix: Better errors for Settings#{reset,update}

* fix: Fixed SettingsFolder#display

* docs: Added comments to justify the usage of Map.prototype.get.call

* fix: SettingsFolder#display not getting the right path

* fix: Revert change to commandHandler's mention only check

* docs: Justify the prefix.length in commandHandler's mentionOnly

* feat: SettingsFolder#pluck

* fix: Updated providers helpers for the new Gateway results

* fix: SettingsFolder#update not overloading well

* fix: Settings and SettingsFolder trying to access client

* fix: Fixed updating not patching correctly

* fix: settingsUpdateEntry event receiving a SettingsFolder instead of the Settings instance

* src: Better relative path parsing, fixed update inserting full values into db

* fix: JSON provider not parsing create queries

* fix: Configuration commands not checking correctly

* src: Added Settings#target, Gateway#{create,acquire}, removed create in get

* fix: Init schedule before pieces (but after SG)

* i18n,fix: Default guild option in Settings#{update,reset}, i18n all errors

* refactor: Better guild resolving for Settings#{reset,update}

* fix: resolveGuild calls without client

* fix: SQLProvider accessing to the gateway wrongly

* changelog: Updated for the PR

* fix: Settings#clone not working as expected

* misc: Make Settings#{id,gateway,target} enumerable

* revert: Settings#{gateway,target} enumerability

* cleanup: Remove GatewayStorage#defaults

* misc: Make Schema#defaults a property

* fix: Call this.init() in destroy instead of patching

* docs: Updated changelog

* lint: Fixed lint

* docs: Fixed jsdocs

* src: Reorganize files

* style: Remove optional property in Settings#id

* memory: Deepclone patch, not init

* fix: Access to undefined

* fix: Settings#update not serializing arrays correctly

* src: Remove all usage of deepClone in SettingsGateway

* misc: Make Schema#defaults a SettingsFolder instance

* docs: Finished changelog

* misc: Remove guild option from the conf command

* docs: Forgot to mention arrayPosition->arrayIndex in CHANGELOG

* perf: Optimize Gateway#sync to the clouds for empty schemas

* feat: Added `KlasaClient#settingsSync` event. (#475)

* feat: Added `KlasaClient#settingsSyncEntry` event.

* docs: Correct PR number in CHANGELOG

* src: Emit settingsSyncEntry on broadcastEval

* fix: Entry settings not setting their existence status to true in shards

* misc: Renamed `KlasaClient#{settingsUpdateEntry,settingsDeleteEntry,settingsCreateEntry}` to `KlasaClient#{settingsUpdate,settingsDelete,settingsCreate}`.

* misc: Rename prefix settingsUpdate core event to... coreSettingsUpdate

* fix: coreSettingsUpdate is not an once event

* fix: Old typings, patch before emitting events

* fix: Settings delete core event (#477)

* fix: Added core event handler for settingsDelete

* docs: Updated IncludedEvents

* docs: Correct changelog PR number

* fix: Don't check this.client.shard in both core settings event handlers

* misc: Add IS support for both core settings events handlers

* misc: Much better and faster shard check for both settings events

* src: GatewayDriver#register changes

* fix: I missed this

* misc: Requested changes

* src: Requested change

* fix: Who did this

* fix: settings is not defined in the evals
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Meta: Refactor Issues and PRs related to refactors. Mod: SettingsGateway Issues and PRs related to SettingsGateway. SEM: Major PRs that contain breaking changes and should be released in the next major version. Type: Caching Issues and PRs related to caching. Type: Enhancement Issues and PRs related to feature enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants