Move entities to database

This commit is contained in:
Rory& committed 2026-06-12 17:58:18 +02:00
1 parent 6821fe0513
commit c77d00e243
250 files changed
+695 -538

No files matched your search

+2 -1
View File
@@ -16,7 +16,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Session, TimeSpan } from "@spacebar/util";
import { Session } from "@spacebar/database";
import { TimeSpan } from "@spacebar/util";
import { setInterval } from "node:timers";
export async function initInstance() {
+1 -14
View File
@@ -19,13 +19,9 @@
import { HTTPError } from "lambert-server/HTTPError";
import { Equal, In, Or } from "typeorm";
import { fillMessageUrlEmbeds, randomString } from "@spacebar/api";
import { getDatabase } from "@spacebar/database";
import { getDatabase, Application, Attachment, Channel, CloudAttachment, Guild, Member, Message, ReadState, Role, Session, Sticker, User, Webhook } from "@spacebar/database";
import { mathLogBase, arrayDistributeSequentially } from "@spacebar/extensions";
import {
Application,
Attachment,
Channel,
CloudAttachment,
Config,
DiscordApiErrors,
emitEvent,
@@ -33,27 +29,18 @@ import {
FieldErrors,
getPermission,
getRights,
Guild,
handleFile,
HERE_MENTION,
Member,
Message,
MessageCreateEvent,
MessageFlags,
Permissions,
ReadState,
Role,
ROLE_MENTION,
Session,
Snowflake,
Sticker,
Stopwatch,
TraceNode,
TraceRoot,
TraceSubTree,
User,
USER_MENTION,
Webhook,
} from "@spacebar/util";
import {
ActionRowComponent,
+3 -2
View File
@@ -1,8 +1,9 @@
import { handleMessage, postHandleMessage } from "@spacebar/api";
import { Attachment, Channel, Config, DiscordApiErrors, emitEvent, FieldErrors, Message, MessageCreateEvent, Snowflake, uploadFile, ValidateName, Webhook } from "@spacebar/util";
import { Request, Response } from "express";
import { HTTPError } from "lambert-server/HTTPError";
import { MoreThan } from "typeorm";
import { handleMessage, postHandleMessage } from "@spacebar/api";
import { Attachment, Channel, Message, Webhook } from "@spacebar/database";
import { Config, DiscordApiErrors, emitEvent, FieldErrors, MessageCreateEvent, Snowflake, uploadFile, ValidateName } from "@spacebar/util";
import { WebhookExecuteSchema } from "@spacebar/schemas";
export const executeWebhook = async (req: Request, res: Response) => {
+4 -3
View File
@@ -16,14 +16,15 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { sleep, arrayDistinctBy, arrayGroupBy } from "@spacebar/extensions";
import { Config, EmbedCache, emitEvent, Message, MessageUpdateEvent, normalizeUrl, OrmUtils } from "@spacebar/util";
import { Embed, EmbedImage, EmbedType } from "@spacebar/schemas";
import * as cheerio from "cheerio";
import crypto from "node:crypto";
import { yellow } from "picocolors";
import probe from "probe-image-size";
import { FindOptionsWhere, In } from "typeorm";
import { EmbedCache, Message } from "@spacebar/database";
import { sleep, arrayDistinctBy, arrayGroupBy } from "@spacebar/extensions";
import { Config, emitEvent, MessageUpdateEvent, normalizeUrl, OrmUtils } from "@spacebar/util";
import { Embed, EmbedImage, EmbedType } from "@spacebar/schemas";
export function getDefaultFetchOptions(): RequestInit {
return {