Get Started - Learn How To Make Your Bot!Code SnippetsGet methodsPost methodsWeb APIUseful linksList of all currently Free ItemsList of all currently Free EmotesHighrise Bot SDK Changelog
Added on version 23.1.0b13
on_message(self, user_id: str, conversation_id: str, is_new_conversation: bool) -> None:
Handler that is triggered when bot received message from user
βοΈUse cases
Simple print on what this method returns:
async def on_message(self, user_id: str, conversation_id: str, is_new_conversation: bool) -> None: print(f"New message from {user_id} in {conversation_id}! Is new conversation: {is_new_conversation}")
Output: New message from 6111e1fb22dcb50edf32e4a8 in 1_on_1:6111e1fb22dcb50edf32e4a8:649b87f63cf84acc47487627! Is new conversation: False
You can use this method whenever you wnat that an action is triggered from a user sending a message to the bot.