Haha-Yes/commands/general/spoiler.js

36 lines
674 B
JavaScript
Raw Normal View History

2019-03-07 22:50:40 +01:00
const { Command } = require('discord-akairo');
class spoilerCommand extends Command {
constructor() {
super('spoiler', {
aliases: ['spoiler'],
category: 'general',
args: [
{
id: 'text',
type: 'string',
match: 'rest'
}
],
description: {
content: 'Replace every letter in your text with letter spoiler',
usage: 'this is epic',
examples: ['this is epic']
}
});
}
async exec(message, args) {
let text = args.text;
if (!text)
return;
text = text.split('').join('||||');
// Send the final text
2019-03-07 22:52:40 +01:00
message.delete();
2019-03-07 22:50:40 +01:00
return message.channel.send('||' + text + '||');
}
}
module.exports = spoilerCommand;