模仿指定用户的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类中添加方法以执行所需的功能。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在数据库中插入行时自动发送电子邮件?   从进程输出读取的Java问题   java质疑StyledDocument和JTextPane之间的关系,以及接口的正确使用   java错误getPlayer(args[0]);   java如何使Spring引导在重新打包的WAR中包含清单文件?   Java中的除法与模   java使用2d数组和JfreeChart制作散点图   java扩展SonarQube FindBugs插件和自定义FindBugs插件   javaspring:hibernate+ehcache   具有不正确的equals和HashCode实现的java HashMap   java Jaspersoft报告网。旧金山。jasperreports。发动机例外:net。旧金山。jasperreports。发动机填满JRepressionEvalException:计算表达式时出错   java如果输入与其变量不匹配,如何添加错误   在java中使用简单数组[]实现队列   无法启动上下文路径/hsx上的java FAIL应用程序