66 lines
1.8 KiB
TypeScript
66 lines
1.8 KiB
TypeScript
// Module ID: 4091
|
|
// Function ID: 4092
|
|
// Name: RouteParam
|
|
// Dependencies: [677, 1379, 507, 4092, 2]
|
|
|
|
// Module 4091 (RouteParam)
|
|
import { PSEUDO_GUILD_IDS } from "INVITE";
|
|
import { StaticChannelRoutes } from "set";
|
|
|
|
const result = require("getAuthenticationPath").fileFinishedImporting("modules/routing/RouteParam.tsx");
|
|
|
|
export const RouteParam = {
|
|
guildId() {
|
|
let obj = arg0;
|
|
if (arg0 === undefined) {
|
|
obj = {};
|
|
}
|
|
let str = obj.name;
|
|
if (str === undefined) {
|
|
str = "guildId";
|
|
}
|
|
let flag = obj.optional;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
const mapped = PSEUDO_GUILD_IDS.map(importDefault(4092));
|
|
const combined = "" + mapped.join("|") + "|\\d+";
|
|
let flag2 = { optional: flag }.optional;
|
|
if (flag2 === undefined) {
|
|
flag2 = false;
|
|
}
|
|
let str2 = "";
|
|
if (flag2) {
|
|
str2 = "?";
|
|
}
|
|
const unescapedPathParam = new require(507) /* getAuthenticationPath */.UnescapedPathParam(":" + importDefault(4092)(str) + "(" + combined + ")" + str2);
|
|
return unescapedPathParam;
|
|
},
|
|
channelId() {
|
|
let obj = arg0;
|
|
if (arg0 === undefined) {
|
|
obj = {};
|
|
}
|
|
let str = obj.name;
|
|
if (str === undefined) {
|
|
str = "channelId";
|
|
}
|
|
let flag = obj.optional;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
const items = [...StaticChannelRoutes];
|
|
const mapped = items.map(importDefault(4092));
|
|
const combined = "" + mapped.join("|") + "|\\d+";
|
|
let flag2 = { optional: flag }.optional;
|
|
if (flag2 === undefined) {
|
|
flag2 = false;
|
|
}
|
|
let str2 = "";
|
|
if (flag2) {
|
|
str2 = "?";
|
|
}
|
|
const unescapedPathParam = new require(507) /* getAuthenticationPath */.UnescapedPathParam(":" + importDefault(4092)(str) + "(" + combined + ")" + str2);
|
|
return unescapedPathParam;
|
|
}
|
|
};
|