mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fix(CommandInteraction): cmds with no options throw error (#5734)
This commit is contained in:
@@ -261,6 +261,7 @@ class CommandInteraction extends Interaction {
|
||||
*/
|
||||
_createOptionsCollection(options, resolved) {
|
||||
const optionsCollection = new Collection();
|
||||
if (typeof options === 'undefined') return optionsCollection;
|
||||
for (const option of options) {
|
||||
optionsCollection.set(option.name, this.transformOption(option, resolved));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user