out-of-your-element/index.js

24 lines
547 B
JavaScript

const HeatSync = require("heatsync")
const config = require("./config")
const passthrough = require("./passthrough")
const sync = new HeatSync()
Object.assign(passthrough, { config, sync })
const DiscordClient = require("./modules/DiscordClient")
const discord = new DiscordClient(config.discordToken)
passthrough.discord = discord
;(async () => {
await discord.cloud.connect()
console.log("Discord gateway started")
require("./stdin")
})()
process.on("unhandledRejection", console.error)
process.on("uncaughtException", console.error)