added sendImage

This commit is contained in:
mrbesen 2019-02-05 21:06:34 +01:00
parent facdc8635c
commit eaaf6c506b
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 13 additions and 0 deletions

View File

@ -104,6 +104,19 @@ public class TUser {
}
}
public void sendImage(String caption, String url) {
try {
String cap = "";
if(caption != null) {
if(!caption.isEmpty())
cap = "&caption=" + caption;
}
api.request("sendPhoto", "chat_id" + id + cap + "&photo=" + url);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public boolean equals(Object user) {
if(user instanceof TUser) {