mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-06-03 05:59:51 +08:00
权限修改
This commit is contained in:
parent
ee0270cc08
commit
88cf977de4
@ -549,11 +549,11 @@ async def open_switch_func(bot: HoshinoBot, ev: CQEvent):
|
|||||||
if m == '自动签到':
|
if m == '自动签到':
|
||||||
try:
|
try:
|
||||||
if at:
|
if at:
|
||||||
if at and at.group(1) != qid:
|
if qid in bot.config.SUPERUSERS:
|
||||||
|
qid = at.group(1)
|
||||||
|
else:
|
||||||
await bot.send(ev, '你没有权限。', at_sender=True)
|
await bot.send(ev, '你没有权限。', at_sender=True)
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
qid = at.group(1)
|
|
||||||
else:
|
else:
|
||||||
qid = ev.sender['user_id']
|
qid = ev.sender['user_id']
|
||||||
gid = ev.group_id
|
gid = ev.group_id
|
||||||
@ -569,11 +569,11 @@ async def open_switch_func(bot: HoshinoBot, ev: CQEvent):
|
|||||||
elif m == '推送':
|
elif m == '推送':
|
||||||
try:
|
try:
|
||||||
if at:
|
if at:
|
||||||
if at and at.group(1) != qid:
|
if qid in bot.config.SUPERUSERS:
|
||||||
|
qid = at.group(1)
|
||||||
|
else:
|
||||||
await bot.send(ev, '你没有权限。', at_sender=True)
|
await bot.send(ev, '你没有权限。', at_sender=True)
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
qid = at.group(1)
|
|
||||||
else:
|
else:
|
||||||
qid = ev.sender['user_id']
|
qid = ev.sender['user_id']
|
||||||
gid = ev.group_id
|
gid = ev.group_id
|
||||||
@ -617,11 +617,11 @@ async def close_switch_func(bot: HoshinoBot, ev: CQEvent):
|
|||||||
if m == '自动签到':
|
if m == '自动签到':
|
||||||
try:
|
try:
|
||||||
if at:
|
if at:
|
||||||
if at and at.group(1) != qid:
|
if qid in bot.config.SUPERUSERS:
|
||||||
|
qid = at.group(1)
|
||||||
|
else:
|
||||||
await bot.send(ev, '你没有权限。', at_sender=True)
|
await bot.send(ev, '你没有权限。', at_sender=True)
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
qid = at.group(1)
|
|
||||||
else:
|
else:
|
||||||
qid = ev.sender['user_id']
|
qid = ev.sender['user_id']
|
||||||
uid = await select_db(qid, mode='uid')
|
uid = await select_db(qid, mode='uid')
|
||||||
@ -636,11 +636,11 @@ async def close_switch_func(bot: HoshinoBot, ev: CQEvent):
|
|||||||
elif m == '推送':
|
elif m == '推送':
|
||||||
try:
|
try:
|
||||||
if at:
|
if at:
|
||||||
if at and at.group(1) != qid:
|
if qid in bot.config.SUPERUSERS:
|
||||||
|
qid = at.group(1)
|
||||||
|
else:
|
||||||
await bot.send(ev, '你没有权限。', at_sender=True)
|
await bot.send(ev, '你没有权限。', at_sender=True)
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
qid = at.group(1)
|
|
||||||
else:
|
else:
|
||||||
qid = ev.sender['user_id']
|
qid = ev.sender['user_id']
|
||||||
uid = await select_db(qid, mode='uid')
|
uid = await select_db(qid, mode='uid')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user