Skip to content

Commit

Permalink
fix: nbmod中错误的cpx_api索引
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Sep 4, 2024
1 parent 2543aa2 commit 1b47478
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions campux/imbot/nbmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def fdelay(seconds: float=3):
async def sign_up_func(event: Event):

try:
pwd = await api.campux_api.sign_up(uin=int(event.get_user_id()))
pwd = await ap.cpx_api.sign_up(uin=int(event.get_user_id()))

await fdelay()

Expand All @@ -62,7 +62,7 @@ async def sign_up_func(event: Event):
@reset_password.handle()
async def reset_password_func(event: Event):
try:
pwd = await api.campux_api.reset_password(uin=int(event.get_user_id()))
pwd = await ap.cpx_api.reset_password(uin=int(event.get_user_id()))

await fdelay()

Expand Down Expand Up @@ -143,7 +143,7 @@ async def approve_post_func(event: Event):
post_id = int(params[0])
comment = ""

post = await api.campux_api.get_post_info(post_id)
post = await ap.cpx_api.get_post_info(post_id)

if post is None:
await approve_post.finish(f"稿件 #{post_id} 不存在")
Expand Down Expand Up @@ -182,7 +182,7 @@ async def reject_post_func(event: Event):
post_id = int(params[-1])
comment = " ".join(params[:-1])

post = await api.campux_api.get_post_info(post_id)
post = await ap.cpx_api.get_post_info(post_id)

if post is None:
await reject_post.finish(f"稿件 #{post_id} 不存在")
Expand Down Expand Up @@ -220,7 +220,7 @@ async def resend_post_func(event: Event):
if len(params) == 1:
post_id = int(params[0])

post = await api.campux_api.get_post_info(post_id)
post = await ap.cpx_api.get_post_info(post_id)

if post is None:
await resend_post.finish(f"稿件 #{post_id} 不存在")
Expand Down

0 comments on commit 1b47478

Please sign in to comment.