Files
xiao/commands/search/lmgtfy.js
T
Daniel Odendahl Jr 14f85f94bd 22.0.0
2017-06-01 08:44:02 +00:00

26 lines
733 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class LMGTFYCommand extends Command {
constructor(client) {
super(client, {
name: 'lmgtfy',
group: 'search',
memberName: 'lmgtfy',
description: 'Responds with a LMGTFY link.',
args: [
{
key: 'query',
prompt: 'What would you like to the link to search for?',
type: 'string',
parse: (query) => encodeURIComponent(query)
}
]
});
}
run(msg, args) {
const { query } = args;
return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`);
}
};