sendChatAction method
Future<bool>
sendChatAction(
- ChatAction action, {
- int? messageThreadId,
- String? businessConnectionId,
Sends a chat action to the current chat.
This tells the user that the bot is doing something (typing, uploading, etc.).
Example:
await ctx.sendChatAction(ChatAction.typing);
await ctx.sendChatAction(ChatAction.uploadPhoto);
Implementation
Future<bool> sendChatAction(
ChatAction action, {
int? messageThreadId,
String? businessConnectionId,
}) async {
final chatId = _getChatId();
_verifyInfo([chatId], APIMethod.sendChatAction);
return api.sendChatAction(
chatId!,
action,
messageThreadId: _threadId(messageThreadId),
businessConnectionId: _businessConnectionId(businessConnectionId),
);
}