You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/general/sayd.js

42 lines
834 B
JavaScript

const { Command } = require('discord-akairo');
5 years ago
const rand = require('../../rand.js');
6 years ago
6 years ago
class SaydCommand extends Command {
constructor() {
super('sayd', {
aliases: ['sayd'],
category: 'general',
clientPermissions: 'MANAGE_MESSAGES',
args: [
{
id: 'text',
type: 'string',
match: 'rest'
6 years ago
}
],
description: {
content: 'Repeat what you say but delete the text you sent',
usage: '[text]',
examples: ['[member] is a big [adverbs] [verb]']
}
});
}
6 years ago
async exec(message, args) {
let text = args.text;
if (!text)
return;
5 years ago
text = rand.random(text, message);
6 years ago
// Send the final text
message.channel.send('===ANTI-SNIPE MESSAGE===')
.then(msg => {
msg.delete();
});
6 years ago
message.delete();
return message.channel.send(text);
}
}
6 years ago
module.exports = SaydCommand;