Files
discordeno/helpers/discovery/validDiscoveryTerm.ts
2022-03-25 19:23:44 +00:00

14 lines
387 B
TypeScript

import type { Bot } from "../../bot.ts";
import { DiscordValidateDiscoverySearchTerm } from "../../types/discord.ts";
export async function validDiscoveryTerm(bot: Bot, term: string) {
const result = await bot.rest.runMethod<DiscordValidateDiscoverySearchTerm>(
bot.rest,
"get",
bot.constants.endpoints.DISCOVERY_VALID_TERM(),
{ term },
);
return result.valid;
}