Interface TelegramMessageContext
- All Superinterfaces:
MessageContext, StringMessageContext
A message that came from Telegram.
Builds on
StringMessageContext.-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageContext
MessageContext.CacheKey -
Method Summary
Modifier and TypeMethodDescriptionstatic net.flectone.pulse.module.integration.telegram.model.TelegramMessageContextImpl.TelegramMessageContextImplBuilderbuilder()Starts building this context.@NonNull Stringchat()The chat the message was posted in.@NonNull StringThe author's first name.@NonNull StringlastName()The author's last name.reply()The author and text of the replied-to message, or null.@NonNull StringuserName()The author's Telegram handle.Returns a copy carrying a different value.withFirstName(@NonNull String firstName) Returns a copy carrying a different value.withLastName(@NonNull String lastName) Returns a copy carrying a different value.Returns a copy carrying a different value.withUserName(@NonNull String userName) Returns a copy carrying a different value.Methods inherited from interface MessageContext
addFlag, addFlags, addTagResolver, addTagResolvers, base, createCacheKey, flags, isFlag, message, receiver, sender, tagResolver, toBuilder, uuid, withBase, withFlags, withMessage, withReceiver, withSender, withTagResolver, withUuidMethods inherited from interface StringMessageContext
string, withString
-
Method Details
-
builder
static net.flectone.pulse.module.integration.telegram.model.TelegramMessageContextImpl.TelegramMessageContextImplBuilder builder()Starts building this context.- Returns:
- a new builder
-
userName
-
firstName
-
lastName
-
chat
@NonNull String chat()The chat the message was posted in.- Returns:
- the chat the message was posted in
-
reply
-
withUserName
Returns a copy carrying a different value.- Parameters:
userName- the author's Telegram handle- Returns:
- the copy
-
withFirstName
Returns a copy carrying a different value.- Parameters:
firstName- the author's first name- Returns:
- the copy
-
withLastName
Returns a copy carrying a different value.- Parameters:
lastName- the author's last name- Returns:
- the copy
-
withChat
Returns a copy carrying a different value.- Parameters:
chat- the chat the message was posted in- Returns:
- the copy
-
withReply
Returns a copy carrying a different value.- Parameters:
reply- the author and text of the replied-to message, or null- Returns:
- the copy
-