mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(CommandInteraction): add 'commandGuildId' (#8018)
This commit is contained in:
@@ -40,6 +40,12 @@ class CommandInteraction extends Interaction {
|
||||
*/
|
||||
this.commandType = data.data.type;
|
||||
|
||||
/**
|
||||
* The id of the guild the invoked application command is registered to
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.commandGuildId = data.data.guild_id ?? null;
|
||||
|
||||
/**
|
||||
* Whether the reply to this interaction has been deferred
|
||||
* @type {boolean}
|
||||
|
||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -432,6 +432,7 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
|
||||
public commandId: Snowflake;
|
||||
public commandName: string;
|
||||
public commandType: ApplicationCommandType;
|
||||
public commandGuildId: Snowflake | null;
|
||||
public deferred: boolean;
|
||||
public ephemeral: boolean | null;
|
||||
public replied: boolean;
|
||||
|
||||
Reference in New Issue
Block a user