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.5.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_bfinfo-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 9bf8be4b5ecd914a1bd382991a92c97addac29dda731588f5ddbd2e8d9bfbaa3
MD5 62390ee5921fef9127f8d9e8646bd7fa
BLAKE2b-256 7a069f3dedbae50ef469eada9ffd3aa8bfc0f5250a8e597984fca0ebb6b7c1e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b5196401171239e7d989f90d0a857b6bbb86cf30e9d8ec9ec9b79fa4ec52251e
MD5 d40e08d99707e7a1ad898d5038fd2aa5
BLAKE2b-256 86d01841785fcf97313ae4e8116bbf6718c6cbeefceadc9bd27b1c79dc443cbe

See more details on using hashes here.

Supported by

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