Creates a new user context menu command middleware
The predicate for the middleware
Optional
failCallback: UserContextMenuCommandCallback// This means that the user context menu command will only be ran if the target user is not a bot
const IsNotBot = new UserContextMenuCommandMiddleware(
(client, interaction) => !interaction.targetUser.bot,
(client, interaction) => interaction.reply('You cannot use this command on a bot.')
);
module.exports.default = new UserContextMenuCommand({
// ...
middlewares: [IsNotBot]
}, (...) => { ... });
Optional
failThe predicate for the middleware
Generated using TypeDoc
Represents a user context menu command middleware