Skip to content

Commit

Permalink
__init__.py开头加入了抽卡次数限制
Browse files Browse the repository at this point in the history
  • Loading branch information
H-K-Y committed Oct 21, 2020
1 parent b97e356 commit bcdcba0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import json
from hoshino.util import DailyNumberLimiter

Gacha10Limit = 10 # 10连每天可以抽的次数
Gacha90Limit = 3 # 90连每天可以抽的次数
Gacha180Limit = 1 # 180连每天可以抽的次数
Gacha10Limit = 100 # 10连每天可以抽的次数
Gacha90Limit = 100 # 90连每天可以抽的次数
Gacha180Limit = 100 # 180连每天可以抽的次数
daily_limiter_10 = DailyNumberLimiter(Gacha10Limit)
daily_limiter_90 = DailyNumberLimiter(Gacha90Limit)
daily_limiter_180 = DailyNumberLimiter(Gacha180Limit)
Expand Down Expand Up @@ -96,8 +96,8 @@ async def gacha_(bot, ev):
@sv.on_prefix(('原神卡池切换','原神切换卡池'))
async def set_pool(bot, ev):

pool_name = ev.message.extract_plain_text()
gid = str(ev.group_id).strip()
pool_name = ev.message.extract_plain_text().strip()
gid = str(ev.group_id)

if pool_name in POOL.keys():
if gid in group_pool:
Expand Down
4 changes: 2 additions & 2 deletions gacha.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,14 @@ def gacha_info(pool = DEFAULT_POOL):
_4_star_up_info = POOL[pool]["4星up"]
up_info = ""

for _5_star in ROLE_ARMS_LIST["5_up"]:
for _5_star in ROLE_ARMS_LIST[_5_star_up_info]:
im = Image.open(Gacha.get_png_path(_5_star))
im = Gacha.pic2b64(im)
up_info += str(MessageSegment.image(im))
up_info += "\n"
up_info += f"{_5_star} ★★★★★"

for _4_star in ROLE_ARMS_LIST["4_up"]:
for _4_star in ROLE_ARMS_LIST[_4_star_up_info]:
im = Image.open(Gacha.get_png_path(_4_star))
im = Gacha.pic2b64(im)
up_info += str(MessageSegment.image(im))
Expand Down

0 comments on commit bcdcba0

Please sign in to comment.