Code for %{query} command
#!/usr/bin/env node
'use strict';
const utils = require('../utils/utils.js');
const creds = require('../credentials/config.js');
const kb = require('../handler.js').kb;
const got = require('got');
module.exports = {
name: 'kb rt',
invocation: async (channel, user, message, platform) => {
try {
const msg = utils.getParam(message);
let genres = require('../../data/genres.json');
if (!msg) {
if (platform === 'whisper') {
return 'list of genres with command examples: https://kunszg.com/genres';
}
return `${user['username']}, list of genres with command examples: https://kunszg.com/genres`;
}
const checkIfDecimal = new RegExp('^[0-9]+