decord/source/modules/routing/RouteParam.tsx

67 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 4143
// Function ID: 4144
2026-07-29 08:29:29 +00:00
// Name: RouteParam
2026-08-08 06:10:11 +00:00
// Dependencies: [677, 1379, 507, 4144, 2]
2026-07-20 16:05:17 +00:00
2026-08-08 06:10:11 +00:00
// Module 4143 (RouteParam)
2026-07-29 08:29:29 +00:00
import { PSEUDO_GUILD_IDS } from "INVITE";
2026-07-23 10:11:24 +00:00
import { StaticChannelRoutes } from "set";
const result = require("getAuthenticationPath").fileFinishedImporting("modules/routing/RouteParam.tsx");
2026-07-20 16:05:17 +00:00
export const RouteParam = {
2026-07-29 08:29:29 +00:00
guildId() {
let obj = arg0;
if (arg0 === undefined) {
2026-07-20 16:05:17 +00:00
obj = {};
}
let str = obj.name;
if (str === undefined) {
str = "guildId";
}
let flag = obj.optional;
if (flag === undefined) {
flag = false;
}
2026-08-08 06:10:11 +00:00
const mapped = PSEUDO_GUILD_IDS.map(importDefault(4144));
2026-07-29 08:29:29 +00:00
const combined = "" + mapped.join("|") + "|\\d+";
let flag2 = { optional: flag }.optional;
if (flag2 === undefined) {
flag2 = false;
}
let str2 = "";
if (flag2) {
str2 = "?";
}
2026-08-08 06:10:11 +00:00
const unescapedPathParam = new require(507) /* getAuthenticationPath */.UnescapedPathParam(":" + importDefault(4144)(str) + "(" + combined + ")" + str2);
2026-07-29 08:29:29 +00:00
return unescapedPathParam;
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
channelId() {
let obj = arg0;
if (arg0 === undefined) {
2026-07-20 16:05:17 +00:00
obj = {};
}
let str = obj.name;
if (str === undefined) {
str = "channelId";
}
let flag = obj.optional;
if (flag === undefined) {
flag = false;
}
2026-07-23 10:11:24 +00:00
const items = [...StaticChannelRoutes];
2026-08-08 06:10:11 +00:00
const mapped = items.map(importDefault(4144));
2026-07-29 08:29:29 +00:00
const combined = "" + mapped.join("|") + "|\\d+";
let flag2 = { optional: flag }.optional;
if (flag2 === undefined) {
flag2 = false;
}
let str2 = "";
if (flag2) {
str2 = "?";
}
2026-08-08 06:10:11 +00:00
const unescapedPathParam = new require(507) /* getAuthenticationPath */.UnescapedPathParam(":" + importDefault(4144)(str) + "(" + combined + ")" + str2);
2026-07-29 08:29:29 +00:00
return unescapedPathParam;
2026-07-20 16:05:17 +00:00
}
};