The predicate of the middleware
Optional
failCallback: MessageCommandCallback// This means that the message command will only be ran if the user is in a voice channel
const IsInVoiceChannel = new MessageCommandMiddleware(
(client, message, args) => message.member.voice.channel !== null,
(client, message, args) => message.reply('You must be in a voice channel to use this command')
);
module.exports.default = new MessageCommand({
// ...
middlewares: [IsInVoiceChannel]
}, (...) => { ... })
Optional
failThe predicate of the middleware
Generated using TypeDoc
Represents a message command middleware