Skip to main content

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

Release files for nonebot-plugin-bfinfo 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-bfinfo 0.0.5
File Size Uploaded
nonebot_plugin_bfinfo-0.0.5.tar.gz 5.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-bfinfo 0.0.5
File Interpreter ABI Platform
nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 MB

Release files / nonebot_plugin_bfinfo-0.0.5.tar.gz

Download URL nonebot_plugin_bfinfo-0.0.5.tar.gz
Size 5.4 MB
Tags Source
SHA-256 checksum
How to use checksums
9bf8be4b5ecd914a1bd382991a92c97addac29dda731588f5ddbd2e8d9bfbaa3
BLAKE2b-256 checksum
How to use checksums
7a069f3dedbae50ef469eada9ffd3aa8bfc0f5250a8e597984fca0ebb6b7c1e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl

Download URL nonebot_plugin_bfinfo-0.0.5-py3-none-any.whl
Size 5.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b5196401171239e7d989f90d0a857b6bbb86cf30e9d8ec9ec9b79fa4ec52251e
BLAKE2b-256 checksum
How to use checksums
86d01841785fcf97313ae4e8116bbf6718c6cbeefceadc9bd27b1c79dc443cbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page