python - How to add a Slack reaction to a send_card



I have an Errbot function that sends a Slack card. How do I then add a reaction to the card instead of the original message(msg) that was received?

def example(self, msg):
            thumbnail=' ',
            image=' ',
            link=' ',
    self._bot.add_reaction(card_msg??, 'grey_question')

1 Answer: 

send_card does not return to you the message it sends which means you will have to do something to get the message info of the card you sent.

One option would be to trigger a callback for all messages in your plugin, inspect the message, and add your reaction there:

Another option could be to use the slack backend api call method to search for your message and add the reaction that way.