Creates a new message context menu command middleware
The predicate for the middleware
Optional
failCallback: MessageContextMenuCommandCallback// This means that the message context menu command will only be ran if the target message is from a bot
const IsMessageFromBot = new MessageContextMenuCommandMiddleware(
(client, interaction) => interaction.targetMessage.author.bot,
(client, interaction) => interaction.reply('You can only use this command on messages from bots.')
);
module.exports.default = new MessageContextMenuCommand({
// ...
middlewares: [IsMessageFromBot]
}, (...) => { ... });
Optional
failThe predicate for the middleware
Generated using TypeDoc
Represents a message context menu command middleware