I'm trying to figure out how to do this and I've finally given up after attempting to checking the documentation, tutorials, and reverse-engineer some other people's bots.
Here is a small bit of code I tried to use to test it:
import slack
slack_token = 'xoxb-***-***-***'
rtmclient = slack.RTMClient(token=slack_token)
@slack.RTMClient.run_on(event="message")
def test(**payload):
print("I'm finally working...")
rtmclient.start()
What am I doing wrong? How do I fix it?