Merge branch 'master' of https://github.com/discord-open-source/discord-api
This commit is contained in:
commit
e67ca0a163
@ -1,11 +1,11 @@
|
|||||||
import { Router, Request, Response } from "express";
|
import { Router, Request, Response } from "express";
|
||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
|
|
||||||
import { check } from "../../../../../util/instanceOf";
|
import { check } from "@util/instanceOf";
|
||||||
import { random } from "../../../../../util/RandomInviteID";
|
import { random } from "@util/RandomInviteID";
|
||||||
import { emitEvent } from "../../../../../util/Event";
|
import { emitEvent } from "@util/Event";
|
||||||
|
|
||||||
import { InviteCreateSchema } from "../../../../../schema/Invite";
|
import { InviteCreateSchema } from "@schema/Invite";
|
||||||
|
|
||||||
import { getPermission, ChannelModel, InviteModel, InviteCreateEvent } from "fosscord-server-util";
|
import { getPermission, ChannelModel, InviteModel, InviteCreateEvent } from "fosscord-server-util";
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Router } from "express";
|
import { Router } from "express";
|
||||||
import { ChannelModel, getPermission, MessageDeleteBulkEvent, MessageModel } from "fosscord-server-util";
|
import { ChannelModel, getPermission, MessageDeleteBulkEvent, MessageModel } from "fosscord-server-util";
|
||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
import Config from "../../../../../../util/Config";
|
import Config from "@util/Config";
|
||||||
import { emitEvent } from "../../../../../../util/Event";
|
import { emitEvent } from "@util/Event";
|
||||||
import { check } from "../../../../../../util/instanceOf";
|
import { check } from "@util/instanceOf";
|
||||||
|
|
||||||
const router: Router = Router();
|
const router: Router = Router();
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { Router } from "express";
|
import { Router } from "express";
|
||||||
import { ChannelModel, ChannelType, getPermission, Message, MessageCreateEvent, MessageModel, Snowflake } from "fosscord-server-util";
|
import { ChannelModel, ChannelType, getPermission, Message, MessageCreateEvent, MessageModel, Snowflake } from "fosscord-server-util";
|
||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
import { MessageCreateSchema } from "../../../../../../schema/Message";
|
import { MessageCreateSchema } from "@schema/Message";
|
||||||
import { check, instanceOf, Length } from "../../../../../../util/instanceOf";
|
import { check, instanceOf, Length } from "@util/instanceOf";
|
||||||
import { PublicUserProjection } from "../../../../../../util/User";
|
import { PublicUserProjection } from "@util/User";
|
||||||
import multer from "multer";
|
import multer from "multer";
|
||||||
import { emitEvent } from "../../../../../../util/Event";
|
import { emitEvent } from "@util/Event";
|
||||||
const router: Router = Router();
|
const router: Router = Router();
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { Request, Response, Router } from "express";
|
import { Request, Response, Router } from "express";
|
||||||
import { BanModel, getPermission, GuildBanAddEvent, GuildBanRemoveEvent, GuildModel } from "fosscord-server-util";
|
import { BanModel, getPermission, GuildBanAddEvent, GuildBanRemoveEvent, GuildModel } from "fosscord-server-util";
|
||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
import { getIpAdress } from "../../../../../middlewares/GlobalRateLimit";
|
import { getIpAdress } from "@middlewares/GlobalRateLimit";
|
||||||
import { BanCreateSchema } from "../../../../../schema/Ban";
|
import { BanCreateSchema } from "@schema/Ban";
|
||||||
import { emitEvent } from "../../../../../util/Event";
|
import { emitEvent } from "@util/Event";
|
||||||
import { check } from "../../../../../util/instanceOf";
|
import { check } from "@util/instanceOf";
|
||||||
import { removeMember } from "../../../../../util/Member";
|
import { removeMember } from "@util/Member";
|
||||||
import { getPublicUser } from "../../../../../util/User";
|
import { getPublicUser } from "@util/User";
|
||||||
|
|
||||||
const router: Router = Router();
|
const router: Router = Router();
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Config } from "fosscord-server-util";
|
import { Config, Snowflake } from "fosscord-server-util";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|
||||||
@ -22,6 +22,9 @@ export interface RateLimit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DefaultOptions {
|
export interface DefaultOptions {
|
||||||
|
general: {
|
||||||
|
instance_id: bigint;
|
||||||
|
};
|
||||||
permissions: {
|
permissions: {
|
||||||
user: {
|
user: {
|
||||||
createGuilds: boolean;
|
createGuilds: boolean;
|
||||||
@ -102,6 +105,9 @@ export interface DefaultOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const DefaultOptions: DefaultOptions = {
|
export const DefaultOptions: DefaultOptions = {
|
||||||
|
general: {
|
||||||
|
instance_id: Snowflake.generate(),
|
||||||
|
},
|
||||||
permissions: {
|
permissions: {
|
||||||
user: {
|
user: {
|
||||||
createGuilds: true,
|
createGuilds: true,
|
||||||
|
@ -43,8 +43,12 @@
|
|||||||
|
|
||||||
/* Module Resolution Options */
|
/* Module Resolution Options */
|
||||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
"baseUrl": "./src" /* Base directory to resolve non-absolute module names. */,
|
||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
"paths": {
|
||||||
|
"@util/*": ["util/*"],
|
||||||
|
"@middlewares/*": ["middlewares/*"],
|
||||||
|
"@schema/*": ["schema/*"]
|
||||||
|
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
|
||||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
"types": ["node"] /* Type declaration files to be included in compilation. */,
|
"types": ["node"] /* Type declaration files to be included in compilation. */,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user