minor additions
This commit is contained in:
parent
404971ce76
commit
3e289beec5
|
@ -6,6 +6,7 @@ import java.net.URLEncoder;
|
|||
import de.mrbesen.telegram.AsyncHandler.Callback;
|
||||
import de.mrbesen.telegram.objects.TMessage;
|
||||
import de.mrbesen.telegram.objects.TReplyMarkup;
|
||||
import de.mrbesen.telegram.objects.TUser;
|
||||
|
||||
public class MessageBuilder {
|
||||
|
||||
|
@ -29,6 +30,11 @@ public class MessageBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
public MessageBuilder setReciver(TUser user) {
|
||||
reciver_id = user.getID();
|
||||
return this;
|
||||
}
|
||||
|
||||
public MessageBuilder setText(String txt) {
|
||||
txt = txt.trim();
|
||||
if(txt.isEmpty()) {
|
||||
|
@ -229,4 +235,5 @@ public class MessageBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TelegramAPI implements Runnable {
|
|||
|
||||
public TelegramAPI(String apikey) {
|
||||
if (!apikey.matches(TOKENREGEX) ) {
|
||||
throw new IllegalArgumentException("Invalid API key");
|
||||
throw new IllegalArgumentException("Invalid API key: " + apikey);
|
||||
}
|
||||
this.apikey = apikey;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue