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

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

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

import com.pengrad.telegrambot.model.botcommandscope.BotCommandScope;
import com.pengrad.telegrambot.response.GetMyCommandsResponse;

/**
 * Stas Parshin
 * 31 March 2020
 */
public class GetMyCommands extends BaseRequest {

    public GetMyCommands() {
        super(GetMyCommandsResponse.class);
    }

    /**
     * 
     * @param scope An object that extends the BotCommandScope class. For example: new BotCommandScopeAllPrivateChats()
     * @return
     */
    public GetMyCommands scope(BotCommandScope scope) {
        add("scope", scope);
        return this;
    }

    /**
     * 
     * @param languageCode A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
     * @return
     */
    public GetMyCommands languageCode(String languageCode) {
        add("language_code", languageCode);
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy