帮助QBot新手开发者快速构建简单的QQ机器人
Project description
easyMirai
介绍本项目的注意事项&主体结构
注意本项目基于开源软件 Mirai 进行二次开发
本项目地址: easyMirai
目录
案例
这是一个简单的调用例子,实现了复读机的功能
from easyMirai import http as em
if __name__ == '__main__':
mirai = em.Mirai("YouHost", "YouPort", "YouKey", "YouQid")
print(mirai.begin())
while True:
mirai.delay()
if mirai.getCountMessage()['data'] != 0:
message = mirai.getFetchLatestMessageFormat()
if message['From'] == "FriendMessage":
msg = {'type': 'Plain', "text": message['Plain'][0]}
mirai.sendFriendMessage(msg, message['Sender'])
更多案例请查阅 Example 目录,我们将持续更新相关案例,以方便调用!
调用
关于调用问题一定要实例化后进行对于数据的操作!
# bad
if mirai.getFetchLatestMessageFormat() == "text":
...
# good
message = mirai.getFetchLatestMessageFormat()
if message == "text":
...
声明
本项目基于开源软件 Mirai 进行二次开发
不得扭曲或隐藏免费且开源的事实
本项目使用AGPLv3
此项目创建于2022.05.15,如果出现开发程序上的各种问题欢迎在issues发布!
easyMirai@ExMikuPro
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyMirai-1.19.36.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for easyMirai-1.19.36-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76340e8a84758fb82dcde0d9f82d31594a6decd0ef97b21fde1dafaedd970649 |
|
MD5 | e570e4e067125716013c2d063bcaff2f |
|
BLAKE2b-256 | 74536e7b20ef00aac9261a7201d41d603539ed999ac21a7b741dab19f4cf71f9 |