🐛 Fixed the issue where some commands did not run in a non-blocking manner

This commit is contained in:
洛水居室 2023-06-06 17:03:08 +08:00
parent 8dbaef8776
commit ceaf0a1b09
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ __all__ = ("MetadataPlugin",)
class MetadataPlugin(Plugin): class MetadataPlugin(Plugin):
@handler.command("refresh_metadata", admin=True) @handler.command("refresh_metadata", admin=True, block=False)
async def refresh(self, update: Update, _: CallbackContext) -> None: async def refresh(self, update: Update, _: CallbackContext) -> None:
message = update.effective_message message = update.effective_message
user = update.effective_user user = update.effective_user

View File

@ -340,7 +340,7 @@ class DailyMaterial(Plugin):
logger.debug("角色、武器培养素材图发送成功") logger.debug("角色、武器培养素材图发送成功")
@handler.command("refresh_daily_material", block=False) @handler.command("refresh_daily_material", admin=True, block=False)
async def refresh(self, update: Update, context: CallbackContext): async def refresh(self, update: Update, context: CallbackContext):
user = update.effective_user user = update.effective_user
message = update.effective_message message = update.effective_message

View File

@ -185,7 +185,7 @@ class Map(Plugin):
except MapException as e: except MapException as e:
await message.reply_text(e.message) await message.reply_text(e.message)
@handler.command("refresh_map", admin=True) @handler.command("refresh_map", admin=True, block=False)
async def refresh_map(self, update: Update, _: CallbackContext): async def refresh_map(self, update: Update, _: CallbackContext):
message = update.effective_message message = update.effective_message
msg = await message.reply_text("正在刷新地图数据,请耐心等待...") msg = await message.reply_text("正在刷新地图数据,请耐心等待...")