mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
types: Fix possibly null message properties (#7111)
This commit is contained in:
6
typings/index.d.ts
vendored
6
typings/index.d.ts
vendored
@@ -1566,7 +1566,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
||||
public channelId: Snowflake;
|
||||
public deferred: boolean;
|
||||
public ephemeral: boolean | null;
|
||||
public message: CacheTypeReducer<Cached, Message, APIMessage>;
|
||||
public message: GuildCacheMessage<Cached>;
|
||||
public replied: boolean;
|
||||
public webhook: InteractionWebhook;
|
||||
public inGuild(): this is MessageComponentInteraction<'present'>;
|
||||
@@ -1591,7 +1591,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
||||
export class MessageContextMenuInteraction<
|
||||
Cached extends CacheType = CacheType,
|
||||
> extends ContextMenuInteraction<Cached> {
|
||||
public readonly targetMessage: CacheTypeReducer<Cached, Message, APIMessage>;
|
||||
public readonly targetMessage: NonNullable<CommandInteractionOption<Cached>['message']>;
|
||||
public inGuild(): this is MessageContextMenuInteraction<'present'>;
|
||||
public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;
|
||||
public inRawGuild(): this is MessageContextMenuInteraction<'raw'>;
|
||||
@@ -3924,7 +3924,7 @@ export interface CommandInteractionOption<Cached extends CacheType = CacheType>
|
||||
member?: CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>;
|
||||
channel?: CacheTypeReducer<Cached, GuildChannel | ThreadChannel, APIInteractionDataResolvedChannel>;
|
||||
role?: CacheTypeReducer<Cached, Role, APIRole>;
|
||||
message?: CacheTypeReducer<Cached, Message, APIMessage>;
|
||||
message?: GuildCacheMessage<Cached>;
|
||||
}
|
||||
|
||||
export interface CommandInteractionResolvedData<Cached extends CacheType = CacheType> {
|
||||
|
||||
Reference in New Issue
Block a user