1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
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<Message> {
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;
}
}
|