mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
13 lines
391 B
TypeScript
13 lines
391 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=${term}`,
|
|
);
|
|
|
|
return result.valid;
|
|
}
|