Fix references from moving all those files
This commit is contained in:
parent
4247a3114a
commit
915c34646a
22 changed files with 67 additions and 59 deletions
18
start.js
18
start.js
|
@ -1,32 +1,32 @@
|
|||
// @ts-check
|
||||
|
||||
const sqlite = require("better-sqlite3")
|
||||
const migrate = require("./db/migrate")
|
||||
const migrate = require("./src/db/migrate")
|
||||
const HeatSync = require("heatsync")
|
||||
|
||||
const config = require("./config")
|
||||
const passthrough = require("./passthrough")
|
||||
const db = new sqlite("db/ooye.db")
|
||||
const passthrough = require("./src/passthrough")
|
||||
const db = new sqlite("src/db/ooye.db")
|
||||
|
||||
/** @type {import("heatsync").default} */ // @ts-ignore
|
||||
const sync = new HeatSync()
|
||||
|
||||
Object.assign(passthrough, {config, sync, db})
|
||||
|
||||
const DiscordClient = require("./d2m/discord-client")
|
||||
const DiscordClient = require("./src/d2m/discord-client")
|
||||
|
||||
const discord = new DiscordClient(config.discordToken, "full")
|
||||
passthrough.discord = discord
|
||||
|
||||
const {as} = require("./matrix/appservice")
|
||||
const {as} = require("./src/matrix/appservice")
|
||||
passthrough.as = as
|
||||
|
||||
const orm = sync.require("./db/orm")
|
||||
const orm = sync.require("./src/db/orm")
|
||||
passthrough.from = orm.from
|
||||
passthrough.select = orm.select
|
||||
|
||||
const power = require("./matrix/power.js")
|
||||
sync.require("./m2d/event-dispatcher")
|
||||
const power = require("./src/matrix/power.js")
|
||||
sync.require("./src/m2d/event-dispatcher")
|
||||
|
||||
;(async () => {
|
||||
await migrate.migrate(db)
|
||||
|
@ -34,5 +34,5 @@ sync.require("./m2d/event-dispatcher")
|
|||
console.log("Discord gateway started")
|
||||
await power.applyPower()
|
||||
|
||||
require("./stdin")
|
||||
require("./src/stdin")
|
||||
})()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue