feat(handlers): add startTyping() (#404)

* feat(handlers): triggerTypingIndicator function

* add period

Co-authored-by: Ayyan <ayyantee@gmail.com>

* startTyping is better

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>

Co-authored-by: Ayyan <ayyantee@gmail.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
ITOH
2021-01-20 10:47:37 +01:00
committed by GitHub
parent 874f1ee979
commit 4ee701b159
+9
View File
@@ -122,6 +122,15 @@ export async function getPins(channelID: string) {
return Promise.all(result.map((res) => structures.createMessage(res)));
}
/**
* Trigger a typing indicator for the specified channel. Generally bots should **NOT** implement this route.
* 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 function startTyping(channelID: string) {
return RequestManager.post(endpoints.CHANNEL_TYPING(channelID));
}
/** Send a message to the channel. Requires SEND_MESSAGES permission. */
export async function sendMessage(
channelID: string,