mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
Add argument invalidtext
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class LMGTFYCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'lmgtfy',
|
||||
aliases: ['let-me-google-that-for-you'],
|
||||
group: 'edit-text',
|
||||
memberName: 'lmgtfy',
|
||||
description: 'Creates a LMGTFY link with the query you provide.',
|
||||
credit: [
|
||||
{
|
||||
name: 'LMGTFY',
|
||||
url: 'https://lmgtfy.com/',
|
||||
reason: 'API'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like the link to search for?',
|
||||
type: 'string',
|
||||
validate: query => {
|
||||
if (encodeURIComponent(query).length < 1950) return true;
|
||||
return 'Invalid query, your query is too long.';
|
||||
},
|
||||
parse: query => encodeURIComponent(query)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { query }) {
|
||||
return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user