diff --git a/src/structures/ApplicationCommand.js b/src/structures/ApplicationCommand.js index d1e4de84247a..2a90b38b764c 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -77,6 +77,12 @@ class ApplicationCommand extends Base { * @type {boolean} */ this.defaultPermission = data.default_permission; + + /** + * Autoincrementing version identifier updated during substantial record changes + * @type {Snowflake} + */ + this.version = data.version; } /** @@ -174,6 +180,7 @@ class ApplicationCommand extends Base { if ( command.name !== this.name || ('description' in command && command.description !== this.description) || + ('version' in command && command.version !== this.version) || (commandType && commandType !== this.type) || // Future proof for options being nullable // TODO: remove ?? 0 on each when nullable diff --git a/typings/index.d.ts b/typings/index.d.ts index 192c52528409..6986bbe14cab 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -218,6 +218,7 @@ export class ApplicationCommand extends Base { Snowflake >; public type: ApplicationCommandType; + public version: Snowflake; public delete(): Promise>; public edit(data: ApplicationCommandData): Promise>; public equals(