You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get a script to edit a message, if my user puts #1234 i would like the message to be eddied by the bot to become https:linkaddress.address/show_bug.cgi?id=1234
i found this code in another ticket that was raised but it does not seem to work. unless i am doing it wrong
module.exports = (robot) ->
robot.hear /#([\d]+)/i, (msg) ->
# Link to the associated bug
issueId = msg.match[1]
updatedMsg = msg.message.text.replace("##{issueId}", "[##{issueId}](https://linkaddress.address/show_bug.cgi?id=#{issueId}"
# Call edit. (bot will have to have the permission to do this)
robot.adapter.callMethod('updateMessage',
_id: msg.message.id
rid: msg.message.room
msg: updatedMsg
).catch (err) ->
console.error err
I am trying to get a script to edit a message, if my user puts #1234 i would like the message to be eddied by the bot to become https:linkaddress.address/show_bug.cgi?id=1234
i found this code in another ticket that was raised but it does not seem to work. unless i am doing it wrong
I treid to convert it to JS and got this
Neither work, am i missing somthing, any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: