All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pengrad.telegrambot.request.SendChatAction Maven / Gradle / Ivy

There is a newer version: 7.11.0
Show newest version
package com.pengrad.telegrambot.request;

import com.pengrad.telegrambot.model.request.ChatAction;
import com.pengrad.telegrambot.response.BaseResponse;

/**
 * stas
 * 5/2/16.
 */
public class SendChatAction extends BaseRequest {

    public SendChatAction(Object chatId, String action) {
        super(BaseResponse.class);
        add("chat_id", chatId).add("action", action);
    }

    public SendChatAction(Object chatId, ChatAction action) {
        super(BaseResponse.class);
        add("chat_id", chatId).add("action", action.name());
    }

    public SendChatAction messageThreadId(int message_thread_id) {
        add("message_thread_id", message_thread_id);
        return this;
    }

    public SendChatAction businessConnectionId(String businessConnectionId) {
        return add("business_connection_id", businessConnectionId);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy