mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +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,
|
||||
* 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);
|
||||
// If the channel is cached, we can do extra checks/safety
|
||||
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",
|
||||
endpoints.CHANNEL_TYPING(channelId),
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user