forked from Supositware/Haha-Yes
Put text in spoiler
This commit is contained in:
parent
967bef32d5
commit
892c8e382d
1 changed files with 35 additions and 0 deletions
35
commands/general/spoiler.js
Normal file
35
commands/general/spoiler.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
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
|
||||
return message.channel.send('||' + text + '||');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = spoilerCommand;
|
Loading…
Reference in a new issue