fix: RepliableInteraction respect cached generic (#8667)

* 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>
This commit is contained in:
Maksi
2022-09-24 16:09:24 +02:00
committed by GitHub
parent 1244854e13
commit 578bc951bd

View File

@@ -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;