This commit is contained in:
ITOH
2021-11-14 18:41:40 +01:00
2 changed files with 2 additions and 10 deletions

View File

@@ -4,11 +4,7 @@ import { SnakeCasedPropertiesDeep } from "../../types/util.ts";
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
export async function getGatewayBot(bot: Bot): Promise<GetGatewayBot> {
const result = await bot.rest.runMethod<GetGatewayBot>(
bot.rest,
"get",
bot.constants.endpoints.GATEWAY_BOT
);
const result = await bot.rest.runMethod<GetGatewayBot>(bot.rest, "get", bot.constants.endpoints.GATEWAY_BOT);
return {
url: result.url,

View File

@@ -4,9 +4,5 @@ import { SnakeCasedPropertiesDeep } from "../../types/util.ts";
/** This function will return the raw user payload in the rare cases you need to fetch a user directly from the API. */
export async function getUser(bot: Bot, userId: bigint) {
return await bot.rest.runMethod<User>(
bot.rest,
"get",
bot.constants.endpoints.USER(userId)
);
return await bot.rest.runMethod<User>(bot.rest, "get", bot.constants.endpoints.USER(userId));
}