问题描述
我有一个'Bot'类,扩展了'TelegramLongPollingBot',并且有一个空白来设置机器人图标:
private void setChatIcon() {
ClassLoader loader = ClassLoader.getSystemClassLoader();
URL url = loader.getResource("/sky.jpg");
assert url != null;
File file = new File(url.getPath());
SetChatPhoto setChatPhoto = new SetChatPhoto();
try {
execute(setChatPhoto.setPhoto(file));
} catch (TelegramApiException e) {
e.printstacktrace();
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)