Skip to content

Commit

Permalink
feat(v14-changes): cover ComponentType enum values in component colle…
Browse files Browse the repository at this point in the history
…ctors (discordjs#1220)
  • Loading branch information
rmlgaming authored Sep 22, 2022
1 parent 09ee089 commit 5a74051
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions guide/additional-info/changes-in-v14.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,19 @@ Additionally, new typeguards have been added:

A new `ignore` event has been added which is emitted whenever an element is not collected by the collector.

Component collector options now use the `ComponentType` enum values:

```diff
+ const { ComponentType } = require('discord.js');

const collector = interaction.channel.createMessageComponentCollector({
filter,
- componentType: 'BUTTON',
+ componentType: ComponentType.Button,
time: 20000
});
```

### CommandInteraction

`CommandInteraction#commandGuildId` has been added which is the id of the guild the invoked application command is registered to.
Expand Down

0 comments on commit 5a74051

Please sign in to comment.