Skip to content

Commit

Permalink
fix(CommandInteraction): channel type should be text based channels (#…
Browse files Browse the repository at this point in the history
…5690)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
  • Loading branch information
zLupa and SpaceEEC committed Jun 2, 2021
1 parent d21e6af commit 5141ea4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/structures/CommandInteraction.js
Expand Up @@ -15,6 +15,13 @@ class CommandInteraction extends Interaction {
constructor(client, data) {
super(client, data);

/**
* The channel this interaction was sent in
* @type {?TextChannel|NewsChannel|DMChannel}
* @name CommandInteraction#channel
* @readonly
*/

/**
* The ID of the invoked application command
* @type {Snowflake}
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -437,6 +437,7 @@ declare module 'discord.js' {

export class CommandInteraction extends Interaction {
public readonly command: ApplicationCommand | null;
public channel: TextChannel | DMChannel | NewsChannel;
public commandID: string;
public commandName: string;
public deferred: boolean;
Expand Down

0 comments on commit 5141ea4

Please sign in to comment.