简单清洗的猫
limbo的Python项目详细描述
聊天机器人
安装
- 复制回购协议
- Create a bot user如果你 还没有,复制api标记
- export slack_token=“您的api令牌”
- make run(或make repl用于本地测试)
- 邀请Limbo进入任何你想要的频道,或者只是留言 #将军。尝试键入!gif dubstep cat来测试它
小猫手套
我建议你总是在 virtualenv 让你在一个干净的环境中跑步。
命令参数
- –test,-t:输入命令行模式以进入limbo repl。
- –钩子:指定要测试的钩子。(默认为“消息”)。
- -C:运行一个命令。
- –database,-d:Limbo sqlite3数据库的存储位置。默认为 Limbo.Sqlite3号。
- –pluginpath,-pp:limbo应该查找的路径 插件(默认为/plugins)。
环境变量
- slack_令牌:slack api令牌。必修的。
- limbo_loglevel:日志级别。默认为“信息”。
- limbo_log file:要将信息记录到的文件。默认为无。
- limbo_log format:日志消息的格式。默认为 %(asctime)s:%(levelname)s:%(name)s:%(message)s。
- limbo_plugins:要加载的以逗号分隔的插件字符串。默认为 加载plugins目录中的所有插件(默认为 “limbo/plugins”)
请注意,如果您收到一条错误消息,说明您没有看到 环境变量,您可能正在以sudo的形式运行limbo,这将 清理环境。使用virtualenv并始终以用户身份运行limbo 过程!
命令
添加自己的命令非常简单!只需在中创建一个python文件 带有on_message函数的插件目录,该函数返回 弦。
您可以使用!help命令打印出所有可用的命令 以及关于他们的简短帮助信息。!help <plugin>将返回 特定插件的帮助。
默认情况下,插件不会对来自其他机器人的消息做出反应(只是 来自人类的信息)。定义要处理的on_bot_message函数 机器人信息。请参阅示例插件以了解一种简单的方式来定义 这些功能。
这些是当前的默认插件:
码头工人
- 如何通过Docker试用Limbo?
- @Petergrace维护了一个公共的Limbo构建,可以从 码头登记处。执行make docker_run将启动 默认机器人。
- make docker_stop将停止bot
- 当我启动Docker容器时,我看到一个关于无法
来源:limbo.env.这是个问题吗?
- NO.Limb.Env文件仅在使用KubNeNETs时存在。 包含用于存储环境的不透明秘密配方 变量。
- 我想为Limbo开发插件,但仍然想使用
Docker来运行机器人。有没有一种快速的方法将插件添加到
机器人程序?
- 是的!使用包含的dockerfile.dev作为模板,并简单地 通过make docker_build构建然后需要启动bot 例如,使用新的图像名称 docker run -d-eSLACK_TOKEN=<your_token> new_image_name
贡献者
- [@fsalum](https://github.com/fsalum)
- [@rodvodka](https://github.com/rodvodka)
- [@mattfora](https://github.com/mattfora)
- [@dguido](https://github.com/dguido)
- [@joegermuska](https://github.com/JoeGermuska)
- [@mathyv](https://github.com/MathyV)
- [@stopspazzing](https://github.com/stopspazzing)
- [@noise](https://github.com/noise)
- [@drewp](https://github.com/drewp)
- [@tetraetc](https://github.com/TetraEtc)
- [@livingsyn](https://github.com/LivingInSyn)
- [@reversegremlin](https://github.com/reversegremlin)
- [@adamghill](https://github.com/adamghill)
- [@petergrace](https://github.com/PeterGrace)
- [@skiftCreative](https://github.com/SkiftCreative)
- [@diceone](https://github.com/diceone)
- [@角](https://github.com/rnagle)
- [@topher200](https://github.com/topher200)
- [@StewPoll](https://github.com/StewPoll)
- [@esoares](https://github.com/eSoares)
- [@sweinstein89](https://github.com/sweinstein89)