如何为电报上的简单回声机器人修复[删除旧的Webhook错误]

时间:2019-06-22 09:08:04

标签: java intellij-idea telegram-bot telegram-webhook

每当我尝试使用Java [Unable to execute deleteWebhook method]运行echo bot都会导致错误。我对此很陌生,我尝试更改socksProxyHostsocksProxyPort,但仍然无法使用。

public class Main {
    public static void main(String[] args) {

        System.getProperties().put( "proxySet", "true" );
        System.getProperties().put( "socksProxyHost", "127.0.0.1" );
        System.getProperties().put( "socksProxyPort", "9150" );

        ApiContextInitializer.init();

        TelegramBotsApi botsApi = new TelegramBotsApi();

        try {
            botsApi.registerBot(new myBiruh12_bot());
        } catch (TelegramApiException e) {
            e.printStackTrace();
        }
    }
}

错误在行(registerBot)。

0 个答案:

没有答案