forked from cadence/out-of-your-element
Finish moving from SQL to New Funny ORM
This commit is contained in:
parent
4e1e590c3a
commit
79bd0254f0
19 changed files with 87 additions and 87 deletions
|
@ -3,7 +3,7 @@
|
|||
const assert = require("assert")
|
||||
|
||||
const passthrough = require("../../passthrough")
|
||||
const { discord, sync, db } = passthrough
|
||||
const {discord, sync, db, select} = passthrough
|
||||
/** @type {import("../converters/thread-to-announcement")} */
|
||||
const threadToAnnouncement = sync.require("../converters/thread-to-announcement")
|
||||
/** @type {import("../../matrix/api")} */
|
||||
|
@ -15,8 +15,7 @@ const api = sync.require("../../matrix/api")
|
|||
* @param {import("discord-api-types/v10").APIThreadChannel} thread
|
||||
*/
|
||||
async function announceThread(parentRoomID, threadRoomID, thread) {
|
||||
/** @type {string?} */
|
||||
const creatorMxid = db.prepare("SELECT mxid FROM sim WHERE discord_id = ?").pluck().get(thread.owner_id)
|
||||
const creatorMxid = select("sim", "mxid", "WHERE discord_id = ?").pluck().get(thread.owner_id)
|
||||
|
||||
const content = await threadToAnnouncement.threadToAnnouncement(parentRoomID, threadRoomID, creatorMxid, thread, {api})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue