Skip to content

Commit

Permalink
fix: RepliableInteraction respect cached generic (#8667)
Browse files Browse the repository at this point in the history
* fix: RepliableInteraction respect cached generic

* fix: prettier format

* Update packages/discord.js/typings/index.d.ts

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 24, 2022
1 parent 1244854 commit 578bc95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/discord.js/typings/index.d.ts
Expand Up @@ -1501,7 +1501,11 @@ export type Interaction<Cached extends CacheType = CacheType> =
| AutocompleteInteraction<Cached>
| ModalSubmitInteraction<Cached>;

export type RepliableInteraction<Cached extends CacheType = CacheType> = Exclude<Interaction, AutocompleteInteraction>;
export type RepliableInteraction<Cached extends CacheType = CacheType> = Exclude<
Interaction<Cached>,
AutocompleteInteraction<Cached>
>;

export class BaseInteraction<Cached extends CacheType = CacheType> extends Base {
// This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks.
private readonly _cacheType: Cached;
Expand Down

0 comments on commit 578bc95

Please sign in to comment.