-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
34 lines (28 loc) · 932 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
var http = require("http")
setInterval(function () {
http.get("http://cinema-discord-bot.herokuapp.com/")
}, 300000) // every 5 minutes (300000)
require('dotenv').config()
var bugsnag = require('@bugsnag/js')
var bugsnagClient = bugsnag(process.env.BUGSNAG_API_KEY)
const path = require('path')
const { CommandoClient } = require('discord.js-commando')
const client = new CommandoClient({
commandPrefix: process.env.BOT_PREFIX,
owner: process.env.BOT_OWNER,
disableEveryone: true
})
client.registry
.registerDefaultTypes()
.registerDefaultGroups()
.registerDefaultCommands({
help: false, prefix: false, ping: false, eval: false, commandState: false
})
.registerGroups([
['cinema', 'Cinema']
])
.registerCommandsIn(path.join(__dirname, 'commands'))
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`)
})
client.login(process.env.BOT_TOKEN)