rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.68k stars 1.18k forks source link

Wrong "PATH" value in "RestrictChatMember" class #266

Closed amirsafiallah closed 7 years ago

amirsafiallah commented 7 years ago

Hello, the "PATH" field in the following class has wrong value:

org.telegram.telegrambots.api.methods.groupadministration.RestrictChatMember

Current Value: public static final String PATH = "kickchatmember"; Correct Value: public static final String PATH = "restrictchatmember";

amirsafiallah commented 7 years ago

For those who want to fix this problem quickly, instantiate and override 'getMethod' like this:

RestrictChatMember restrictChatMember = new RestrictChatMember() {
    @Override
    public String getMethod() {
        return "restrictchatmember";
    }
};