Remove ALL fosscord mentions
This commit is contained in:
@@ -25,9 +25,9 @@ import {
|
||||
Recipient,
|
||||
handleFile,
|
||||
ChannelModifySchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router: Router = Router();
|
||||
// TODO: delete channel
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { route } from "@fosscord/api";
|
||||
import { random } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import { random } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
Invite,
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
User,
|
||||
Guild,
|
||||
PublicInviteRelation,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { isTextChannel } from "./messages";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@@ -21,9 +21,9 @@ import {
|
||||
getPermission,
|
||||
MessageAckEvent,
|
||||
ReadState,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
Attachment,
|
||||
Channel,
|
||||
emitEvent,
|
||||
FosscordApiErrors,
|
||||
SpacebarApiErrors,
|
||||
getPermission,
|
||||
getRights,
|
||||
Message,
|
||||
@@ -31,11 +31,11 @@ import {
|
||||
uploadFile,
|
||||
MessageCreateSchema,
|
||||
MessageEditSchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Router, Response, Request } from "express";
|
||||
import multer from "multer";
|
||||
import { route } from "@fosscord/api";
|
||||
import { handleMessage, postHandleMessage } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import { handleMessage, postHandleMessage } from "@spacebar/api";
|
||||
import { HTTPError } from "lambert-server";
|
||||
|
||||
const router = Router();
|
||||
@@ -163,14 +163,14 @@ router.put(
|
||||
const snowflake = Snowflake.deconstruct(message_id);
|
||||
if (Date.now() < snowflake.timestamp) {
|
||||
// message is in the future
|
||||
throw FosscordApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE;
|
||||
throw SpacebarApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE;
|
||||
}
|
||||
|
||||
const exists = await Message.findOne({
|
||||
where: { id: message_id, channel_id: channel_id },
|
||||
});
|
||||
if (exists) {
|
||||
throw FosscordApiErrors.CANNOT_REPLACE_BY_BACKFILL;
|
||||
throw SpacebarApiErrors.CANNOT_REPLACE_BY_BACKFILL;
|
||||
}
|
||||
|
||||
if (req.file) {
|
||||
|
||||
@@ -30,8 +30,8 @@ import {
|
||||
PartialEmoji,
|
||||
PublicUserProjection,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
import { route } from "@fosscord/api";
|
||||
} from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Router, Response, Request } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { In } from "typeorm";
|
||||
|
||||
@@ -25,9 +25,9 @@ import {
|
||||
getRights,
|
||||
MessageDeleteBulkEvent,
|
||||
Message,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ import {
|
||||
Rights,
|
||||
Reaction,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { handleMessage, postHandleMessage, route } from "@fosscord/api";
|
||||
import { handleMessage, postHandleMessage, route } from "@spacebar/api";
|
||||
import multer from "multer";
|
||||
import { FindManyOptions, FindOperator, LessThan, MoreThan } from "typeorm";
|
||||
import { URL } from "url";
|
||||
@@ -146,7 +146,7 @@ router.get("/", async (req: Request, res: Response) => {
|
||||
x.author = User.create({
|
||||
id: "4",
|
||||
discriminator: "0000",
|
||||
username: "Fosscord Ghost",
|
||||
username: "Spacebar Ghost",
|
||||
public_flags: 0,
|
||||
});
|
||||
x.attachments?.forEach((y: Attachment) => {
|
||||
|
||||
@@ -24,11 +24,11 @@ import {
|
||||
Member,
|
||||
Role,
|
||||
ChannelPermissionOverwriteSchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Router, Response, Request } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
const router: Router = Router();
|
||||
|
||||
// TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
|
||||
|
||||
@@ -24,9 +24,9 @@ import {
|
||||
Message,
|
||||
MessageUpdateEvent,
|
||||
DiscordApiErrors,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import { isTextChannel } from "./messages";
|
||||
import { FindManyOptions, Between, Not, FindOperator } from "typeorm";
|
||||
import {
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Message,
|
||||
MessageDeleteBulkEvent,
|
||||
PurgeSchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Router, Response, Request } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@@ -27,8 +27,8 @@ import {
|
||||
PublicUserProjection,
|
||||
Recipient,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
import { route } from "@fosscord/api";
|
||||
} from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Channel, emitEvent, Member, TypingStartEvent } from "@fosscord/util";
|
||||
import { route } from "@fosscord/api";
|
||||
import { Channel, emitEvent, Member, TypingStartEvent } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Router, Request, Response } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
Config,
|
||||
@@ -27,10 +27,10 @@ import {
|
||||
Webhook,
|
||||
WebhookCreateSchema,
|
||||
WebhookType,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { isTextChannel } from "./messages/index";
|
||||
import { DiscordApiErrors } from "@fosscord/util";
|
||||
import { DiscordApiErrors } from "@spacebar/util";
|
||||
import crypto from "crypto";
|
||||
|
||||
const router: Router = Router();
|
||||
@@ -63,7 +63,7 @@ router.post(
|
||||
|
||||
// TODO: move this
|
||||
if (name === "clyde") throw new HTTPError("Invalid name", 400);
|
||||
if (name === "Fosscord Ghost") throw new HTTPError("Invalid name", 400);
|
||||
if (name === "Spacebar Ghost") throw new HTTPError("Invalid name", 400);
|
||||
|
||||
if (avatar) avatar = await handleFile(`/avatars/${channel_id}`, avatar);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user