mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
6
packages/discord.js/typings/index.d.ts
vendored
6
packages/discord.js/typings/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user