-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
35 lines (30 loc) · 943 Bytes
/
index.js
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
const env = require('dotenv').config()
const fs = require('fs')
const Discord = require('discord.js')
const Commando = require('discord.js-commando')
const path = require('path')
const sqlite = require('sqlite');
const client = new Commando.Client({
commandPrefix: 'tarot ',
owner: process.env.OWNER_ID
});
client.registry
.registerDefaultTypes()
.registerGroups([
['tarot', 'Tarot Commands']
])
.registerDefaultGroups()
.registerDefaultCommands({
help: true,
prefix: false,
ping: true
})
.registerCommandsIn(path.join(__dirname, 'commands'));
client.setProvider(
sqlite.open(path.join(__dirname, 'settings.sqlite3')).then(db => new Commando.SQLiteProvider(db))
).catch(console.error);
client.once('ready', () => {
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`);
client.user.setActivity('tarot help');
});
client.login(process.env.BOT_TOKEN);