public class MessageContext extends Object
Update, originating end-user and the arguments present in its message (if any).
A user is not bound to the usage of this higher level context as it's possible to fetch the underlying Update using update().
| Modifier and Type | Method and Description |
|---|---|
String[] |
arguments()
If there's no message in the update, then this will an empty array.
|
Long |
chatId() |
boolean |
equals(Object o) |
String |
firstArg() |
int |
hashCode() |
static MessageContext |
newContext(org.telegram.telegrambots.api.objects.Update update,
EndUser user,
Long chatId,
String... arguments) |
String |
secondArg() |
String |
thirdArg() |
String |
toString() |
org.telegram.telegrambots.api.objects.Update |
update() |
EndUser |
user() |
public static MessageContext newContext(org.telegram.telegrambots.api.objects.Update update, EndUser user, Long chatId, String... arguments)
public EndUser user()
public Long chatId()
public String[] arguments()
public String firstArg()
IllegalStateException - if message has no argumentspublic String secondArg()
IllegalStateException - if message has no argumentspublic String thirdArg()
IllegalStateException - if message has no argumentspublic org.telegram.telegrambots.api.objects.Update update()
Copyright © 2017. All rights reserved.