Fix type errors in scripts and make executable
This commit is contained in:
11
scripts/save-channel-names-to-db.js
Normal file → Executable file
11
scripts/save-channel-names-to-db.js
Normal file → Executable file
@@ -1,19 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
// @ts-check
|
||||
|
||||
const sqlite = require("better-sqlite3")
|
||||
const HeatSync = require("heatsync")
|
||||
|
||||
const config = require("../config")
|
||||
const passthrough = require("../passthrough")
|
||||
const {reg} = require("../src/matrix/read-registration")
|
||||
const passthrough = require("../src/passthrough")
|
||||
const db = new sqlite("db/ooye.db")
|
||||
|
||||
const sync = new HeatSync({watchFS: false})
|
||||
|
||||
Object.assign(passthrough, {config, sync, db})
|
||||
Object.assign(passthrough, {sync, db})
|
||||
|
||||
const DiscordClient = require("../d2m/discord-client")
|
||||
const DiscordClient = require("../src/d2m/discord-client")
|
||||
|
||||
const discord = new DiscordClient(config.discordToken, "no")
|
||||
const discord = new DiscordClient(reg.ooye.discord_token, "no")
|
||||
passthrough.discord = discord
|
||||
|
||||
;(async () => {
|
||||
|
Reference in New Issue
Block a user