mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
* feat: base plugin lib idea * fix: stuff * fmt * fix: imports and exports * fix: errors & tests * fix: remove logs
19 lines
614 B
TypeScript
19 lines
614 B
TypeScript
import { DiscordGetGatewayBot, Optionalize } from "../deps.ts";
|
|
|
|
export function transformGatewayBot(payload: DiscordGetGatewayBot) {
|
|
const gatewayBot = {
|
|
url: payload.url,
|
|
shards: payload.shards,
|
|
sessionStartLimit: {
|
|
total: payload.session_start_limit.total,
|
|
remaining: payload.session_start_limit.remaining,
|
|
resetAfter: payload.session_start_limit.reset_after,
|
|
maxConcurrency: payload.session_start_limit.max_concurrency,
|
|
},
|
|
};
|
|
|
|
return gatewayBot as Optionalize<typeof gatewayBot>;
|
|
}
|
|
|
|
export interface GetGatewayBot extends ReturnType<typeof transformGatewayBot> {}
|