WebexCommunity / webex-node-bot-framework

A framework for creating Webex Teams bots using node and express
MIT License
57 stars 48 forks source link

How can use the bot to edit a message? #100

Closed bndynet closed 1 year ago

bndynet commented 1 year ago

I want to use this framework to send a message, and then to change this message. But I cannot find which function to do this.

jpjpjp commented 1 year ago

Hi @bndynet. Best place to get help with the framework is "Webex Node Bot Framework" space on Webex

There are several helper functions to send messages, the most common one being bot.say().

The framework does not provide a helper method for editing a message yet, but you can call (bot.getWebexSDK())[https://github.com/WebexCommunity/webex-node-bot-framework#botsayformat-message--promisemessage] and then call the SDK's update message method.

bndynet commented 1 year ago

Thanks @jpjpjp for your reply. I found the update function was added since version 2.49. But this framework is still using version 2.29.3. Do you have any plans to upgrade to the newer version?

image image
jpjpjp commented 1 year ago

Hi @bndynet. Unfortunately, newer versions of the SDK are causing the framework's tests to fail. I haven't been able to resolve those issues. The version I have is the last one that seems to work.

It is still possible for your app to update a message but I think you would have to use the requests library (or something similar) to make a call to the Update Message REST API

bndynet commented 1 year ago

Hi @bndynet. Unfortunately, newer versions of the SDK are causing the framework's tests to fail. I haven't been able to resolve those issues. The version I have is the last one that seems to work.

It is still possible for your app to update a message but I think you would have to use the requests library (or something similar) to make a call to the Update Message REST API

Got it, thanks again @jpjpjp . I copied the update method code from SDK, and it works now. Have a nice weekend and thanks all your team for contributing this great tool.