out-of-your-element/d2m/actions/register-user.js

20 lines
615 B
JavaScript
Raw Normal View History

2023-04-30 12:57:30 +00:00
// @ts-check
2023-05-07 20:27:42 +00:00
const assert = require("assert")
2023-04-30 12:57:30 +00:00
2023-05-07 20:27:42 +00:00
const passthrough = require("../../passthrough")
const { discord, sync, db } = passthrough
2023-05-08 05:22:20 +00:00
/** @type {import("../../matrix/api")} */
const api = sync.require("../../matrix/api")
2023-05-07 20:27:42 +00:00
/** @type {import("../../matrix/file")} */
const file = sync.require("../../matrix/file")
/**
* A sim is an account that is being simulated by the bridge to copy events from the other side.
* @param {import("discord-api-types/v10").APIUser} user
*/
async function createSim(user) {
assert.notEqual(user.discriminator, "0000", "user is not a webhook")
2023-05-08 05:22:20 +00:00
api.register("_ooye_example")
}