如何在Python Slackbot框架中访问消息中的文本?

2024-05-18 10:53:26 发布

您现在位置:Python中文网/ 问答频道 /正文

使用Python Slackbot框架,我做到了这一点:

from slackbot.bot import respond_to

@respond_to('Give me (.*)')
def giveme(message, something):
    message.reply('Here is {}'.format(something))

但是如何访问消息本身的文本内容呢


Tags: tofromimport框架messagedefbotslackbot