Skip to main content

Nearcade Reporter Plugin

Project description

python3 License

Nearcade Reporter

一个接入 Nearcade 支持 正则命名分组 与 多机厅别名配置 查询 / 更新街机厅当前人数 的 NoneBot2 插件

🚀 使用示例

查询人数:

秋叶原几人
akiba几人

更新人数:

机厅人数 秋叶原 12
机厅人数 ikebukuro 30

搜索机厅:

查找机厅 keywrod

搜索机厅只有SUPERUSERS可用

⚙️ 配置方式

查询人数

QUERY_ATTENDANCE_MATCH='{
  "enabled": true,
  "pattern": "^(?P<arcade>\\\\S+)几人$",
  "reply_message": "{arcade} 当前人数: {count}"
}'

更新人数正则

UPDATE_ATTENDANCE_MATCH='{
  "enabled": true,
  "pattern": "^机厅人数\\\\s*(?P<arcade>\\\\S+)\\\\s*(?P<count>(?:100|[1-9]\\\\d?|0))$",
  "reply_message": "更新成功,{arcade} 当前人数: {count}"
}'

机厅配置

ARCADES='{
  "1001": {
    "arcade_source": "bemani",
    "aliases": ["秋叶原", "akiba"],
    "default_game_id": 1001
  }
}'

请先使用搜索机厅获取机厅ID与机台GameID

⚠️ 注意事项

正则表达式中必须给机厅别名分组命名 arcade 人数命名 count

环境变量中的 JSON 必须是合法 JSON

正则中的反斜杠需要 双重转义(例如 \S、\s、\d)

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_nearcade_reporter-0.1.8.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file nonebot_plugin_nearcade_reporter-0.1.8.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_nearcade_reporter-0.1.8.tar.gz
Algorithm Hash digest
SHA256 a4ef787070b68b49c2b54b60d0d786950b1ff39d8322f644edab3d19e8ecb41a
MD5 58dc953ef33556bcbdb089e67c45ae6d
BLAKE2b-256 3d16c8860bbe1af02e269e4e0f59a55e5f4e4783c7ff4e83e709a2df19793a57

See more details on using hashes here.

File details

Details for the file nonebot_plugin_nearcade_reporter-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_nearcade_reporter-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6c7aa7e6a8ce527643e1603ad258f9aefacd4817acfa66f2300512e5b21f8b17
MD5 9eb1660b2c6efc9636f82a1902501ad7
BLAKE2b-256 5ca411fb6303b1ec2a63634a2b08bd8cc3adcb68d1c3c901692a0f1d39a10ec7

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