mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feat: add UserContextMenuInteraction and MessageContextMenuInteraction (#7003)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
This commit is contained in:
17
typings/index.d.ts
vendored
17
typings/index.d.ts
vendored
@@ -1227,6 +1227,8 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
||||
public isCommand(): this is CommandInteraction<Cached>;
|
||||
public isAutocomplete(): this is AutocompleteInteraction<Cached>;
|
||||
public isContextMenu(): this is ContextMenuInteraction<Cached>;
|
||||
public isUserContextMenu(): this is UserContextMenuInteraction<Cached>;
|
||||
public isMessageContextMenu(): this is MessageContextMenuInteraction<Cached>;
|
||||
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
|
||||
public isSelectMenu(): this is SelectMenuInteraction<Cached>;
|
||||
}
|
||||
@@ -1536,6 +1538,13 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
||||
public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
|
||||
}
|
||||
|
||||
export class MessageContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
|
||||
public readonly targetMessage: CacheTypeReducer<Cached, Message, APIMessage>;
|
||||
public inGuild(): this is MessageContextMenuInteraction<'present'>;
|
||||
public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;
|
||||
public inRawGuild(): this is MessageContextMenuInteraction<'raw'>;
|
||||
}
|
||||
|
||||
export class MessageEmbed {
|
||||
private _fieldEquals(field: EmbedField, other: EmbedField): boolean;
|
||||
|
||||
@@ -2188,6 +2197,14 @@ export class User extends PartialTextBasedChannel(Base) {
|
||||
public toString(): UserMention;
|
||||
}
|
||||
|
||||
export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
|
||||
public readonly targetUser: User;
|
||||
public readonly targetMember: CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember>;
|
||||
public inGuild(): this is UserContextMenuInteraction<'present'>;
|
||||
public inCachedGuild(): this is UserContextMenuInteraction<'cached'>;
|
||||
public inRawGuild(): this is UserContextMenuInteraction<'raw'>;
|
||||
}
|
||||
|
||||
export class UserFlags extends BitField<UserFlagsString> {
|
||||
public static FLAGS: Record<UserFlagsString, number>;
|
||||
public static resolve(bit?: BitFieldResolvable<UserFlagsString, number>): number;
|
||||
|
||||
Reference in New Issue
Block a user