refactor: use proper variable names in callbacks (#9840)

* refactor: use proper variable names in callbacks

* refactor: change parameter names

* refactor: change remaining parameter names

* refactor: change remaining variable names

* refactor(GuildAuditLogsEntry): abstract reduce logic into a new function

* chore: undo unrelated changes

This undoes commit b2d93dce51 as it's unrelated

* refactor: more name changes

* chore: fix tests failing

* refactor: use option instead of opt

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
Danial Raza
2023-10-09 21:49:49 +02:00
committed by GitHub
parent 2aa3250584
commit 11f6955ed9
34 changed files with 104 additions and 79 deletions

View File

@@ -123,7 +123,7 @@ class ApplicationCommand extends Base {
* The options of this command
* @type {ApplicationCommandOption[]}
*/
this.options = data.options.map(o => this.constructor.transformOption(o, true));
this.options = data.options.map(option => this.constructor.transformOption(option, true));
} else {
this.options ??= [];
}
@@ -577,7 +577,7 @@ class ApplicationCommand extends Base {
[nameLocalizationsKey]: choice.nameLocalizations ?? choice.name_localizations,
value: choice.value,
})),
options: option.options?.map(o => this.transformOption(o, received)),
options: option.options?.map(opt => this.transformOption(opt, received)),
[channelTypesKey]: option.channelTypes ?? option.channel_types,
[minValueKey]: option.minValue ?? option.min_value,
[maxValueKey]: option.maxValue ?? option.max_value,