module.exports = (lib) => {
  lib.trigger.add({
    name: 'record',
    call: /^\!record$/i,
    level: 0,
    active: 1,
    func: (e) => {
      lib.sql.query('select value from `f0ck`.`vars` where `key` = "highest_user_count" AND `channel` = ? AND `network` = ? limit 1', [e.channel.getName(), e.network], (err, rows) => {
        if(rows.length) {
          e.reply('Channel record for ' + e.channel.getName() + ': ' + rows[0].value);
        }
        else
          e.reply('No channel record yet.');
      });
    },
    desc: 'get current channel record'
  });
};