Files
discordeno/helpers/discovery/validDiscoveryTerm.ts
2022-02-11 09:49:53 +00:00

14 lines
406 B
TypeScript

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