Skip to main content
nonebot

nonebot-plugin-slot-machine

✨ NoneBot2 一个老虎机插件 ✨

workflow pypi python nonebot

📖 介绍

[!CAUTION] 本插件只适配了milky协议且不打算适配其他协议

[!TIP] 本插件使用了vibe coding技术编写,所以代码有点猎奇是正常的

[!WARNING] 本插件仅在 Yogurt 协议端环境中通过测试,其他协议端可能存在兼容性问题。

一个基于 NoneBot2 的老虎机插件,支持注册金币账户、投注设置、老虎机抽奖、转账、查询,以及内置的“打螺丝”金币获取玩法。

老虎机为 5 行 6 列盘面,包含普通符号、百搭符号和夺宝符号。中奖结果会绘制成图片发送,中奖轮数较多时自动使用合并转发。

💿 安装

使用 nb-cli 安装

在 NoneBot2 项目的根目录下打开命令行,输入以下指令即可安装:

nb plugin install nonebot-plugin-slot-machine
使用包管理器安装

在 NoneBot2 项目的插件目录下打开命令行,根据你使用的包管理器输入相应的安装命令。

pip
pip install nonebot-plugin-slot-machine
pdm
pdm add nonebot-plugin-slot-machine
poetry
poetry add nonebot-plugin-slot-machine
conda
conda install nonebot-plugin-slot-machine

打开 NoneBot2 项目根目录下的 pyproject.toml 文件,在 [tool.nonebot.plugins] 部分追加写入:

"@local" = ["nonebot_plugin_slot_machine"]

⚙️ 配置

本插件会通过 nonebot-plugin-localstore 自动管理数据文件,无需额外配置数据库路径。

需要安装并配置 Milky 适配器:

pip install nonebot-adapter-milky

🎉 使用

在 NoneBot 项目中加载插件:

nonebot.load_plugin("nonebot_plugin_slot_machine")

如果使用 pyproject.toml 加载插件,请在 [tool.nonebot.plugins] 中加入 @local = ["nonebot_plugin_slot_machine"]

指令

指令 说明
注册老虎机 / 注册 注册账号,每人赠送初始金币
设置投注 <投注大小> <投注倍数> 设置投注,投注大小支持 0.020.21,倍数为 1-10
开始旋转 按当前投注设置开始抽奖
规则老虎机 / 老虎机规则 / 规则 查看老虎机、夺宝和打螺丝规则
查询老虎机 / 查询 查看金币、抽奖次数、中奖次数和投注设置
转账 <账号> <金额> 向其他已注册账号转账金币
风控状态 查看当前账号是否被风控封号
开始打螺丝 <分钟> 按普通模式立即打工结算
开始打螺丝 <模式> <分钟> 使用指定模式打工,模式:普通、韭菜、牛马、卷王
打螺丝状态 / 螺丝状态 查看体力和打工状态

示例

注册老虎机
设置投注 0.2 5
开始旋转
查询老虎机
转账 123456 10
开始打螺丝 牛马 10

🎰 玩法说明

  • 中奖需要从第一列开始连续命中,同符号可由百搭符号补位。
  • 每次中奖后会消除中奖符号并补充新符号,奖金倍数翻倍,最高 1024 倍。
  • 盘面任意位置出现 3 个夺宝符号可获得免费抽奖机会,超过 3 个时每多 1 个增加 10 次。
  • 打螺丝体力上限为 100,每 30 秒恢复 1 点。
  • 短时间内向同一账号大量转账,或多个账号集中向同一账号汇款,会触发风控并封号一天。

📦 数据存储

插件数据使用 SQLite,并通过 nonebot-plugin-localstore 存放在插件数据目录中。缓存图片会写入插件缓存目录,发送完成后自动删除。

🙏 致谢

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_slot_machine-0.1.3.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_slot_machine-0.1.3-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_slot_machine-0.1.3.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.1.3.tar.gz
Algorithm Hash digest
SHA256 82719d75b0a03e5cdf8bb74f84b79476abf3fb4148076cf875051fb07d4067f6
MD5 179d185f8e2ad939880a7dfb9ddde01f
BLAKE2b-256 a87f9f7c3b193a3911b95d607944f1d73897aa4815b3e29080ecb761ca71ba6d

See more details on using hashes here.

File details

Details for the file nonebot_plugin_slot_machine-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_slot_machine-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15e55702f4ae031fe88eb37ed7f0e8b945b1ccc087ba53f6804c0020af574f28
MD5 845757593da2dadabba438b4a2377d39
BLAKE2b-256 66217cb8d33cceb1650bcbbf958210e008d7f322bcc41eb28378cc4e0ae6b48a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page