Files
discordeno/helpers/channels/triggerTypingIndicator.ts
T
Skillz4Killz 3a5bdce32d feat: helpers support strings in args (#2478)
* fix: helpers support strings in args

* fix: fmt
2022-09-15 20:59:02 -05:00

22 lines
760 B
TypeScript

import type { Bot } from "../../bot.ts";
import { BigString } from "../../types/shared.ts";
export const startTyping = triggerTypingIndicator;
/**
* Triggers a typing indicator for the bot user.
*
* @param bot - The bot instance to use to make the request.
* @param channelId - The ID of the channel in which to trigger the typing indicator.
*
* @remarks
* Generally, bots should _not_ use this route.
*
* Fires a _Typing Start_ gateway event.
*
* @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
*/
export async function triggerTypingIndicator(bot: Bot, channelId: BigString): Promise<void> {
return await bot.rest.runMethod<void>(bot.rest, "POST", bot.constants.routes.CHANNEL_TYPING(channelId));
}