mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-31 16:10:08 +00: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:
29
src/structures/UserContextMenuInteraction.js
Normal file
29
src/structures/UserContextMenuInteraction.js
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const ContextMenuInteraction = require('./ContextMenuInteraction');
|
||||
|
||||
/**
|
||||
* Represents a user context menu interaction.
|
||||
* @extends {ContextMenuInteraction}
|
||||
*/
|
||||
class UserContextMenuInteraction extends ContextMenuInteraction {
|
||||
/**
|
||||
* The user this interaction was sent from
|
||||
* @type {User}
|
||||
* @readonly
|
||||
*/
|
||||
get targetUser() {
|
||||
return this.options.getUser('user');
|
||||
}
|
||||
|
||||
/**
|
||||
* The member this interaction was sent from
|
||||
* @type {?(GuildMember|APIGuildMember)}
|
||||
* @readonly
|
||||
*/
|
||||
get targetMember() {
|
||||
return this.options.getMember('user');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UserContextMenuInteraction;
|
||||
Reference in New Issue
Block a user