added big todo list to Guild.ts (big chungus)
This commit is contained in:
parent
1211e486f9
commit
0f58995182
@ -107,6 +107,7 @@ export default function rateLimit(opts: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initRateLimits(app: Router) {
|
export async function initRateLimits(app: Router) {
|
||||||
|
return;
|
||||||
const { routes, global, ip, error } = Config.get().limits.rate;
|
const { routes, global, ip, error } = Config.get().limits.rate;
|
||||||
await listenEvent(EventRateLimit, (event) => {
|
await listenEvent(EventRateLimit, (event) => {
|
||||||
Cache.set(event.channel_id as string, event.data);
|
Cache.set(event.channel_id as string, event.data);
|
||||||
|
14
api/src/routes/discoverable-guilds.ts
Normal file
14
api/src/routes/discoverable-guilds.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
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;
|
@ -16,7 +16,42 @@ import { Webhook } from "./Webhook";
|
|||||||
// TODO: guild_scheduled_events
|
// TODO: guild_scheduled_events
|
||||||
// TODO: stage_instances
|
// TODO: stage_instances
|
||||||
// TODO: threads
|
// 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"];
|
export const PublicGuildRelations = ["channels", "emojis", "members", "roles", "stickers", "voice_states"];
|
||||||
|
|
||||||
@Entity("guilds")
|
@Entity("guilds")
|
||||||
@ -58,6 +93,7 @@ export class Guild extends BaseClass {
|
|||||||
|
|
||||||
@Column({ type: "simple-array" })
|
@Column({ type: "simple-array" })
|
||||||
features: string[]; //TODO use enum
|
features: string[]; //TODO use enum
|
||||||
|
//TODO: https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user