Update start_typing.ts

This commit is contained in:
ITOH
2021-04-23 23:27:41 +02:00
parent 3812025506
commit 281416de36
+2 -4
View File
@@ -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;
}