Skip to main content

一个用于 NoneBot 的插件,提供简易左轮禁言小游戏功能,适用于群聊娱乐,支持随机禁言机制。

Project description

nonebot-plugin-revolver

简介

nonebot-plugin-revolver 是一个简易左轮禁言小游戏插件,适用于 NoneBot 框架。通过该插件,群成员可以体验刺激的“俄罗斯轮盘”游戏。

使用方法

指令说明

  • 开启游戏
    使用指令 轮盘,当群内有一名玩家使用该指令时,游戏开始。

  • 开始对决
    使用指令 开枪,任意一个人使用该指令后,触发开枪逻辑。

注意:同一时间群内只能有一场对决。

示例

  1. 玩家 A 在群内发送 轮盘,游戏开始。
  2. 玩家 B 发送 开枪,触发开枪逻辑,游戏继续。

支持的适配器

  • OneBot v11

安装

  1. 使用 pip 安装插件:
    pip install nonebot-plugin-revolver
    
  2. 在 NoneBot 项目的 bot.py 中加载插件:
    nonebot.load_plugin("nonebot_plugin_revolver")
    

配置

在使用插件前,可以通过 .env 配置项进行自定义设置:

  • DISABLED_GROUPS:设置默认禁用插件的群聊 ID 列表。
  • ENABLED_BAN_GROUPS:设置默认允许禁言功能的群聊 ID 列表。
  • BAN_DURATION:设置默认禁言时间,单位为秒。
  • ROLLING_BAN: 设置随机时间禁言,时间为禁言时间内的随机数,布尔值。

贡献

欢迎提交 Issue 和 Pull Request 来改进本插件。

许可证

本项目基于 MIT 许可证开源。

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_revolver-1.1.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_revolver-1.1.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_revolver-1.1.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_revolver-1.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for nonebot_plugin_revolver-1.1.2.tar.gz
Algorithm Hash digest
SHA256 546635aab16206c800001a3c17b1259921cf46311df9643069c1424f20e5249f
MD5 6a25c41bfadd2d5601f482d655011e00
BLAKE2b-256 082820023c9bd05df0041e250d40c891cf12bbc3477f729099692ba16fa7197d

See more details on using hashes here.

File details

Details for the file nonebot_plugin_revolver-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_revolver-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bc34261a4b78718acceeb26d495acacbe06e1279f1caf23387f4c388947d34f
MD5 8e8ce086ed6dc22467c061f5ee24287e
BLAKE2b-256 b954d3cc2a3c4333f38a09010ca37933f0ddd1a4e8825c4a74e9a13f20fa5dc1

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