import { Command } from 'discord-akairo'; import { Message } from 'discord.js'; import { validIDs, owners } from '../../Config'; export default class SayFun extends Command { public constructor() { super('say', { aliases: ['say'], category: 'fun', description: { content: 'Allows you to speak as the bot.', usage: '[text]', examples: [ 'hi this is bot' ] }, ratelimit: 3, args: [ { id: 'text', type: 'string', prompt: { start: 'What would you like to say?' }, match: 'rest' } ] }); } public async exec(msg: Message, { text }): Promise { if (validIDs.includes(msg.author.id) || owners.includes(msg.author.id)) { msg.delete(); msg.channel.startTyping(); await this.client.wait(1500); msg.channel.send(text); return msg.channel.stopTyping(); } return msg.delete(); } }