Fix type errors in scripts and make executable

This commit is contained in:
Cadence Ember
2024-09-15 00:55:54 +12:00
parent 256196cc54
commit b8962780ae
7 changed files with 33 additions and 29 deletions

11
scripts/save-channel-names-to-db.js Normal file → Executable file
View 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 () => {