mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix(rest): proxy cumulative routes
This commit is contained in:
parent
dbc5922ffb
commit
0436a4b162
@ -1,3 +1,3 @@
|
||||
export * from "./slash/SlashCommand";
|
||||
export * from "./slash/SlashCommandOption";
|
||||
export * from "./contextMenu/ContextCommand";
|
||||
export * from './slash/SlashCommand';
|
||||
export * from './slash/SlashCommandOption';
|
||||
export * from './contextMenu/ContextCommand';
|
||||
|
@ -1,5 +1,5 @@
|
||||
export * from "./ActionRow";
|
||||
export * from "./MessageButton";
|
||||
export * from "./SelectMenu";
|
||||
export * from "./TextInput";
|
||||
export * from "./BaseComponent";
|
||||
export * from './ActionRow';
|
||||
export * from './MessageButton';
|
||||
export * from './SelectMenu';
|
||||
export * from './TextInput';
|
||||
export * from './BaseComponent';
|
||||
|
@ -25,12 +25,10 @@ export class Router {
|
||||
if (ArrRequestsMethods.includes(key)) {
|
||||
return (...options: any[]) => this.rest[key](`/${route.join('/')}`, ...options);
|
||||
}
|
||||
route.push(key);
|
||||
return this.createProxy(route);
|
||||
return this.createProxy([...route, key]);
|
||||
},
|
||||
apply: (...[, _, args]) => {
|
||||
route.push(...args.filter((x) => x != null));
|
||||
return this.createProxy(route);
|
||||
return this.createProxy([...route, ...args.filter((x) => x != null)]);
|
||||
}
|
||||
}) as unknown as Routes;
|
||||
}
|
||||
@ -48,7 +46,7 @@ export class CDN {
|
||||
const lastRoute = `${CDN_URL}/${route.join('/')}`;
|
||||
if (value) {
|
||||
if (typeof value !== 'string') {
|
||||
// rome-ignore lint/style/noParameterAssign: ?!
|
||||
// rome-ignore lint/nursery/noParameterAssign: fix multiples value types
|
||||
value = String(value);
|
||||
}
|
||||
return `${lastRoute}/${value}`;
|
||||
@ -56,12 +54,10 @@ export class CDN {
|
||||
return lastRoute;
|
||||
};
|
||||
}
|
||||
route.push(key);
|
||||
return this.createProxy(route);
|
||||
return this.createProxy([...route, key]);
|
||||
},
|
||||
apply: (...[, _, args]) => {
|
||||
route.push(...args.filter((x) => x != null));
|
||||
return this.createProxy(route);
|
||||
return this.createProxy([...route, ...args.filter((x) => x != null)]);
|
||||
}
|
||||
}) as unknown as CDNRoutes;
|
||||
}
|
||||
|
@ -576,8 +576,8 @@ export class Shard {
|
||||
}
|
||||
|
||||
/** This function communicates with the management process, in order to know whether its free to identify. When this function resolves, this means that the shard is allowed to send an identify payload to discord. */
|
||||
async requestIdentify(): Promise<void> { }
|
||||
async requestIdentify(): Promise<void> {}
|
||||
|
||||
/** This function communicates with the management process, in order to tell it can identify the next shard. */
|
||||
async shardIsReady(): Promise<void> { }
|
||||
async shardIsReady(): Promise<void> {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user