mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
13 lines
374 B
TypeScript
13 lines
374 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.routes.DISCOVERY_VALID_TERM(term),
|
|
);
|
|
|
|
return result.valid;
|
|
}
|