模仿指定用户的groupme机器人。
MockBot的Python项目详细描述
#莫克博特[![mockbot版本](https://img.shields.io/pypi/v/MockBot.svg)](https://pypi.org/project/MockBot)
当特定用户发送消息时,用“spongemock”版本响应的机器人。
###作者
daniel gisolfi-所有当前工作-[dgisolfi](https://github.com/dgisolfi)
##GroupMe机器人程序
A GroupMe bot can be created [here](https://dev.groupme.com/bots) and using the Groupme API can send messages to its assigned group. This particular bot uses a callback URL to be notified of new messages. Once notified the message will be parsed and a response will be created if the USER_ID of the sender matches that of the USER_ID environment variable.
##用法
在向groupme注册bot后,必须以环境变量的形式指定以下要求:
user_id-应该在群聊中模拟的用户的id。
示例:用户ID=29384
bot_id-按groupme分配的bot id。
示例:bot_id=A6A7A7A7A7A7A7A7A7A7
group\u id-机器人所在的groupme聊天的id
示例:组ID=0987890987
api_令牌-授权groupme帐户的api令牌
示例:api_token=983u4ritgo0v98ujkorf
设置环境变量后,运行flask服务器,python-m mockbot
##定制/添加
欢迎添加功能/建议,对于可能需要为特定用例添加的任何特定功能,可以简单地解析传入消息,在server.py文件中查找指定输入,并在bot类中添加方法以执行所需的功能。