Skip to main content

nonebot plugin bfinfo

Project description

nonebot

🔥 nonebot_plugin_bfinfo

✨ 战地1、5战绩查询 ✨

license pypi python


插件描述

一款基于Nonebot2的插件

调用Stats API for the Battlefield series,用于QQ私聊或群聊发送战地游戏ID,返回基础信息以及最佳兵种、最佳枪械、最佳载具、最佳模式信息

由于API返回信息不全,获取的json存在一些问题,无法获取正确信息

  • 战地一
    • 等级(rank)字段为0
    • 总治疗量(heals)字段为None
  • 战地五
    • 总治疗量(heals)字段为None
    • 最佳兵种(classes)字段中所有数据为0
    • 最佳游戏模式(gamemodes)字段不存在

因为期末考试,中间隔了好久才完成,文件夹本地测试源码中存放了未加入nonebot框架以前的源码,可以在编译器中直接调试

  • BF1_record:初步完成基本功能,输入游戏ID,绘制基础信息
  • Battlefield_Test:03数据分析.py中实现输入游戏ID,绘制基础信息以及最佳兵种、最佳枪械、最佳载具、最佳模式信息

提供以上源码是为了方便测试,如果你有更好的解决办法,欢迎留言

API如下,将{player_name}替换为游戏ID即可在浏览器中查看信息

https://api.gametools.network/bf1/all/?name={player_name}&lang=en-us
https://api.gametools.network/bfv/all/?name={player_name}&lang=en-us    

本人未系统学习过py,靠仅有的cpp和py的一点点理解制作的,如果有任何问题、建议,欢迎issues

安装

pip install nonebot_plugin_bfinfo

配置项

bot.py中添加

nonebot.load_plugin("nonebot_plugin_bfinfo")

命令

在群聊或私聊中发送BFI+IDBFV+ID

示例

历史

2022.07.05 成功提交给nonebot2,第一次贡献代码,激动!

2022.07.08 修复win环境下,字体缺失,主要原因是配置了Linux的绝对路径,获取文字材质。改为直接在插件中存放华文行楷.TTF

欢迎小🍟入群927254485

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_bfinfo-0.0.4.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

nonebot_plugin_bfinfo-0.0.4-py3-none-any.whl (5.8 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_bfinfo-0.0.4.tar.gz.

File metadata

  • Download URL: nonebot_plugin_bfinfo-0.0.4.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.10

File hashes

Hashes for nonebot_plugin_bfinfo-0.0.4.tar.gz
Algorithm Hash digest
SHA256 505c541951258bab00dc17a08a9699b7a25915088f8914b0ff05cf33de000d77
MD5 cd51718017703b2c9f0c563845688684
BLAKE2b-256 1bb8b25c9bd7bdde91cc9d97c48d1cd98e67579218d4610c029e1e33bf93a636

See more details on using hashes here.

File details

Details for the file nonebot_plugin_bfinfo-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_bfinfo-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ebab1dee6927d44d5b4747c7d6dd2040991658ad107a2bb6bf43059f7eef54bb
MD5 0680c43634c4f44c65e7890c59a5aaac
BLAKE2b-256 5f21277dabab9d309fc66f49f8a4ce1d2077ee0f08426e34624acf1aff7b6da0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page