import { Command } from 'discord-akairo'; import { Message } from 'discord.js'; import { prefix } from '../../Config'; export default class DatabaseOwner extends Command { public constructor() { super('database', { aliases: ['database'], category: 'owner', description: { content: 'Allows you to interact with certain aspects of the bot\'s database.', usage: '[type]', examples: [ 'check ' ] }, ratelimit: 3, ownerOnly: true, args: [ { id: 'type', type: 'string', prompt: { start: 'What type of interaction would you like to have?' } } ] }); } public async exec(msg: Message, { type }): Promise { if (type === 'set') { await this.client.settings.new('guild', { id: msg.guild.id, premium: false, prefix, }); return msg.reply('Current guild has been added to database.') } undefined; } }