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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_bfchat-0.3.2.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.3.2.tar.gz
Algorithm Hash digest
SHA256 b8f3caa66ae251858487762aad79e738fd631bf94cb45b23f2244f9730603148
MD5 43971a3141e07af5b2c460d61206b667
BLAKE2b-256 ff806a1354ec02fb83775076a17f04781ab8acfdb9a537e4fc1aaf0ae60ab56e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_bfchat-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bfd03de06a90b013d92e39d3f12b445daacb00e787eaf61ee758cac85ca3848
MD5 48418a6e60d0276ede9bf5612b5f8aba
BLAKE2b-256 cfd0480cbda997a875eda530e75f82f15b36c494c053ce68ace8731ca8496789

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