-
public interface MessageSenderMust be implemented by strategies to send different type of messages.
-
-
Method Summary
Modifier and Type Method Description abstract Booleansupports(OutboundMessage outboundMessage)Checks if this sender supports sending the specific outbound message. abstract List<Message>send(Long chatId, OutboundMessage outboundMessage)Sends a message. abstract Messageedit(Long chatId, Long messageId, OutboundMessage outboundMessage)Edits an existing message. -
-
Method Detail
-
supports
abstract Boolean supports(OutboundMessage outboundMessage)
Checks if this sender supports sending the specific outbound message.
- Parameters:
outboundMessage- Message to verify.
-
send
abstract List<Message> send(Long chatId, OutboundMessage outboundMessage)
Sends a message.
- Parameters:
chatId- Id of the chat to send the message to.outboundMessage- Message to send.
-
edit
abstract Message edit(Long chatId, Long messageId, OutboundMessage outboundMessage)
Edits an existing message.
- Parameters:
chatId- Id of the chat to send the message to.messageId- Id of the message to edit.outboundMessage- Message to send.
-
-
-
-