mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user