![]() on_button_click ( action = 'btn1-action' ) def click_button ( action, user : IUser = None, source_message : IMessage = None ): pass. on_new_message def new_message ( message : IMessage = None ): pass. Now there are several decorators available to you that you can use on your.Or when created in the same way as the port. Also, the link you copied to the POST webhook must be passed to the APP_ENDPOINT environment variable.You can specify your port in the environment variableĪlso you can pass the port when creating the bot RCBot (port=12345) ]] Here a web server will be configured on the default port 3228 Since communication is carried out in both directions between the RocketChat application and this bot server.If you want to use a custom bot account, then after adding it in the application settings, pass its username like this install package with pip install rocketchat-bot-simple-app-bot and import this in your projectįrom rocketchat_bot_app_bridge.RCBot import RCBotįrom rocketchat_bot_app_ import IButtonįrom rocketchat_bot_app_ import IMessageįrom rocketchat_bot_app_ import IUser.Or leave it blank if you want to use the standard account automatically created for the application ![]() In the Controlled bots settings field, enter the nickname of the bot user you want to use.Then go to the admin settings -> applications -> BotBridge -> and copy the POST webhook address.First, you need to install this application on your rocket chat server.In addition to this description, be sure to see an example of a bot on how to send and build data to send Usage This is a RocketChat bot library using an app bridge to create bots with interactive elements such as buttons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |