Files
xiao/commands/text-edit/lmgtfy.js
T
2018-02-21 22:16:19 +00:00

27 lines
616 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class LMGTFYCommand extends Command {
constructor(client) {
super(client, {
name: 'lmgtfy',
aliases: ['let-me-google-that-for-you'],
group: 'text-edit',
memberName: 'lmgtfy',
description: 'Creates a LMGTFY link with the query you provide.',
args: [
{
key: 'query',
prompt: 'What would you like the link to search for?',
type: 'string',
max: 1950,
parse: query => encodeURIComponent(query)
}
]
});
}
run(msg, { query }) {
return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`);
}
};