mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
40 lines
960 B
JavaScript
40 lines
960 B
JavaScript
const Command = require('../../structures/Command');
|
|
|
|
module.exports = class LatlmesCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'latlmes',
|
|
group: 'edit-text',
|
|
memberName: 'latlmes',
|
|
description: 'Creates a Latlmes fake link that redirects to a rickroll.',
|
|
credit: [
|
|
{
|
|
name: 'Latlmes',
|
|
url: 'https://www.latlmes.com/',
|
|
reason: 'API'
|
|
}
|
|
],
|
|
args: [
|
|
{
|
|
key: 'section',
|
|
prompt: 'What section of the news should the link display?',
|
|
type: 'string',
|
|
max: 100,
|
|
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
|
|
},
|
|
{
|
|
key: 'query',
|
|
prompt: 'What would you like the link to display as?',
|
|
type: 'string',
|
|
max: 500,
|
|
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { section, query }) {
|
|
return msg.say(`http://www.latlmes.com/${section}/${query}-1`);
|
|
}
|
|
};
|