mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Update start_typing.ts
This commit is contained in:
@@ -10,7 +10,7 @@ import { botHasChannelPermissions } from "../../util/permissions.ts";
|
|||||||
* However, if a bot is responding to a command and expects the computation to take a few seconds,
|
* However, if a bot is responding to a command and expects the computation to take a few seconds,
|
||||||
* this endpoint may be called to let the user know that the bot is processing their message.
|
* this endpoint may be called to let the user know that the bot is processing their message.
|
||||||
*/
|
*/
|
||||||
export async function startTyping(channelId: string): Promise<undefined> {
|
export async function startTyping(channelId: string) {
|
||||||
const channel = await cacheHandlers.get("channels", channelId);
|
const channel = await cacheHandlers.get("channels", channelId);
|
||||||
// If the channel is cached, we can do extra checks/safety
|
// If the channel is cached, we can do extra checks/safety
|
||||||
if (channel) {
|
if (channel) {
|
||||||
@@ -35,10 +35,8 @@ export async function startTyping(channelId: string): Promise<undefined> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await rest.runMethod(
|
return await rest.runMethod<undefined>(
|
||||||
"post",
|
"post",
|
||||||
endpoints.CHANNEL_TYPING(channelId),
|
endpoints.CHANNEL_TYPING(channelId),
|
||||||
);
|
);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user