out-of-your-element/index.js

24 lines
547 B
JavaScript
Raw Normal View History

2023-03-05 16:05:35 +00:00
const HeatSync = require("heatsync")
2022-12-07 00:10:31 +00:00
const config = require("./config")
2023-03-05 16:05:35 +00:00
const passthrough = require("./passthrough")
const sync = new HeatSync()
Object.assign(passthrough, { config, sync })
const DiscordClient = require("./modules/DiscordClient")
2022-12-07 00:10:31 +00:00
const discord = new DiscordClient(config.discordToken)
2023-03-05 16:05:35 +00:00
passthrough.discord = discord
;(async () => {
await discord.cloud.connect()
console.log("Discord gateway started")
require("./stdin")
})()
2022-12-07 00:10:31 +00:00
2023-03-05 16:05:35 +00:00
process.on("unhandledRejection", console.error)
process.on("uncaughtException", console.error)