From 3aaf4c8a57f339aa705ead786c4fd17cb845f42e Mon Sep 17 00:00:00 2001 From: xnacly Date: Fri, 3 Sep 2021 21:36:19 +0200 Subject: [PATCH] Revert "added big todo list to Guild.ts (big chungus)" This reverts commit 4a63e1560c07c938ec74f14e5076ec4e69de7ce6. --- api/src/middlewares/RateLimit.ts | 1 - api/src/routes/discoverable-guilds.ts | 14 ---------- util/src/entities/Guild.ts | 38 +-------------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 api/src/routes/discoverable-guilds.ts diff --git a/api/src/middlewares/RateLimit.ts b/api/src/middlewares/RateLimit.ts index a15ccbe6..dffbc0d9 100644 --- a/api/src/middlewares/RateLimit.ts +++ b/api/src/middlewares/RateLimit.ts @@ -107,7 +107,6 @@ export default function rateLimit(opts: { } export async function initRateLimits(app: Router) { - return; const { routes, global, ip, error } = Config.get().limits.rate; await listenEvent(EventRateLimit, (event) => { Cache.set(event.channel_id as string, event.data); diff --git a/api/src/routes/discoverable-guilds.ts b/api/src/routes/discoverable-guilds.ts deleted file mode 100644 index 6ff43cdc..00000000 --- a/api/src/routes/discoverable-guilds.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Guild } from "@fosscord/util"; -import { Router, Request, Response } from "express"; -import { In } from "typeorm"; - -const router = Router(); - -router.get("/", async (req: Request, res: Response) => { - const { limit } = req.params; - - const guilds = await Guild.find({ where: { features: "PENIS" } }); //, take: Math.abs(Number(limit)) }); - res.send({ guilds: guilds }); -}); - -export default router; diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts index 027e99c7..434699ac 100644 --- a/util/src/entities/Guild.ts +++ b/util/src/entities/Guild.ts @@ -16,42 +16,7 @@ import { Webhook } from "./Webhook"; // TODO: guild_scheduled_events // TODO: stage_instances // TODO: threads -// TODO: description -// TODO: categories: -// [{ -// "id": 16, -// "name": { -// "default": "Anime & Manga", -// "localizations": { -// "de": "Anime & Manga", -// "fr": "Anim\u00e9s et mangas", -// "ru": "\u0410\u043d\u0438\u043c\u0435 \u0438 \u043c\u0430\u043d\u0433\u0430" -// } -// }, -// "is_primary": false -// }] -// TODO: -// primary_category :{ -// id: 1, -// name: { -// default: "Gaming", -// localizations: { de: "Gaming", fr: "Gaming", ru: "\u0418\u0433\u0440\u044b" }, -// is_primary: true, -// }, -// }; -// TODO: -// "keywords": [ -// "Genshin Impact", -// "Paimon", -// "Honkai Impact", -// "ARPG", -// "Open-World", -// "Waifu", -// "Anime", -// "Genshin", -// "miHoYo", -// "Gacha" -// ], + export const PublicGuildRelations = ["channels", "emojis", "members", "roles", "stickers", "voice_states"]; @Entity("guilds") @@ -93,7 +58,6 @@ export class Guild extends BaseClass { @Column({ type: "simple-array" }) features: string[]; //TODO use enum - //TODO: https://discord.com/developers/docs/resources/guild#guild-object-guild-features @Column({ nullable: true }) icon?: string;