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

com.antonioaltieri.telegram.botapi.requests.ForwardMessageRequest Maven / Gradle / Ivy

There is a newer version: 1.3.7
Show newest version
package com.antonioaltieri.telegram.botapi.requests;

import com.antonioaltieri.telegram.botapi.types.Message;

import java.util.HashMap;
import java.util.Map;

public class ForwardMessageRequest implements ApiRequest {

    private Map args = new HashMap<>();

    public ForwardMessageRequest(int chatId, int fromChatId, int messageId) {
        args.put("chat_id", String.valueOf(chatId));
        args.put("from_chat_id", String.valueOf(fromChatId));
        args.put("message_id", String.valueOf(messageId));
    }

    @Override
    public String toString() {
        return "ForwardMessageRequest{" +
                "args=" + args +
                '}';
    }

    @Override
    public String getMethodName() {
        return "forwardMessage";
    }

    @Override
    public ResultTypes getResultType() {
        return ResultTypes.MESSAGE;
    }

    @Override
    public Map getArgs() {
        return args;
    }

    @Override
    public RequestStrategy getRequestStrategy() {
        return new PostStrategy();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy