async post({ target, message, reason, name, color, silent }) {
        // Fetch modlog
        const channel = message.guild.channels.find("name", this.client.config.channels.modlog);
        // Throw an error if there is no modlog present.
        if (!channel) return super.error(`Please create a channel named \`#${this.client.config.channels.modlog}\` to use moderation commands.`);

        // Register the offense
        target.user.registerOffense(name, color, reason, message.author);

        // If not silent, send the user a message
        if (!silent) target.send(`You have a new ${name} for the reason \`${reason}\`.`).catch(() => null);

        // Respond to the message
        super.respond(`Successfully executed ${name} on ${target.user.tag}.`);
    }
/**
     * Posts a moderation log
     * @param {Object} data Data returned from the build function
     * @returns {Promise<>} An empty promise
     */
Posts a moderation log
@param {Object} data Data returned from the build function
@returns {Promise<>} An empty promise
Posts a moderation log @param { Object } data Data returned from the build function @returns { Promise< > } An empty promise
async post({ target, message, reason, name, color, silent }) {
        const channel = message.guild.channels.find("name", this.client.config.channels.modlog);
        if (!channel) return super.error(`Please create a channel named \`#${this.client.config.channels.modlog}\` to use moderation commands.`);
        target.user.registerOffense(name, color, reason, message.author);
        if (!silent) target.send(`You have a new ${name} for the reason \`${reason}\`.`).catch(() => null);
        super.respond(`Successfully executed ${name} on ${target.user.tag}.`);
    }
async post ( { target , message , reason , name , color , silent } ) { const channel = message . guild . channels . find ( "name" , this . client . config . channels . modlog ) ; if ( ! channel ) return super . error ( ` \` ${ this . client . config . channels . modlog } \` ` ) ; target . user . registerOffense ( name , color , reason , message . author ) ; if ( ! silent ) target . send ( ` ${ name } \` ${ reason } \` ` ) . catch ( ( ) => null ) ; super . respond ( ` ${ name } ${ target . user . tag } ` ) ; }
Posts a moderation log
 @param {Object} data Data returned from the build function
 @returns {Promise<>} An empty promise
Posts a moderation log @param { Object } data Data returned from the build function @returns { Promise< > } An empty promise
// Fetch modlog // Throw an error if there is no modlog present. // Register the offense // If not silent, send the user a message // Respond to the message