mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
14 lines
387 B
TypeScript
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;
|
|
}
|