Skip to main content

A battlefield 1/v/2042 chatbot based on nonebot2 framework

Project description

xdm, you V ma?

nonebot-plugin-bfchat

一个基于nonebot2平台的战地1/5/2042(测试中)聊天机器人,提供战绩查询,群账号绑定,服务器查询等功能,提供基于htmlrender插件渲染的美观输出。

安装

nb-cli: (推荐)

nb plugin install nonebot-plugin-bfchat

pip: (需要在pyproject.toml手动导入)

pip install nonebot-plugin-bfchat

配置项及默认值

bfchat_prefix = "/"    # bfchat的命令前缀,默认为"/"
bfchat_dir = "./bfchat_data"    # bfchat的存储目录,用于存储群绑定玩家数据

命令列表

使用以下命令前均需要添加配置好的前缀

[game] 替换为 bf1 , bfv , bf2042 查询对应游戏。

命令 作用 备注
bf help 返回本列表
bf init 初始化本群绑定功能,未初始化的群,群员不能使用绑定功能 仅SUPERUSER和群管理员有效
[game] [玩家id] 查询 [玩家id]的战绩信息
例如查询 senpaibf1信息:bf1 senpai
如果查询玩家是me,则会将数据保存至本地
且一小时内再次查询不会再发起请求
[game] [玩家id] weapons 查询 [玩家id]的武器信息
[game] [玩家id] vehicles 查询 [玩家id]的载具信息
bf2042 [玩家id] classes 查询 [玩家id]的bf2042专家信息
[game] bind [玩家id] 将 对应游戏的 [玩家id]与命令发送人绑定,绑定后可使用 me 代替 [玩家id]
例如 bfv me
游戏间绑定不互通
[game] list 列出该服务器所有已绑定的bf1/bfv玩家信息 使用本地数据,不会自动更新
[game] server [服务器名] 查询名字包含 [服务器名]的bf1/bfv服务器

常见问题

中文显示乱码/框框

htmlrender的Q&A

头图不正常加载

头图位于 路过图床, 请检查服务器与图床的网络连通性,您可以自行替换头图链接。

示例

bfv me

bfv server BFV ROBOT

img

bfv list

img

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_bfchat-0.4.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_bfchat-0.4.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_bfchat-0.4.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_bfchat-0.4.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.2 Linux/6.5.0-1025-azure

File hashes

Hashes for nonebot_plugin_bfchat-0.4.0.tar.gz
Algorithm Hash digest
SHA256 604a0d417b5fc864f1d9bf67616ac022d8244fb994e7fe1435d13eff30a78716
MD5 2db867eb11797053f7ecc085ba351929
BLAKE2b-256 f59ab3139f6db3a6cc55fa60219cba2160a1c5c645e020386def7f0af44c3a4e

See more details on using hashes here.

File details

Details for the file nonebot_plugin_bfchat-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_bfchat-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ad50de2322cf8152a636c5fac1090ff4fb75d242d73b11734192a1ee230104
MD5 17981595dc8945477b167512075a377d
BLAKE2b-256 d9596d93f18ec527c011e423ec53720d561e1772ab79c66ade7e9dee321ad6d1

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