mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-24 02:03:03 +00:00
Move entities to database
This commit is contained in:
1 parent
6821fe0513
commit
c77d00e243
250 files changed
+695
-538
No files matched your search
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user