mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 18:04:10 +00:00
🐛 Fixed the issue where some commands did not run in a non-blocking manner
This commit is contained in:
parent
8dbaef8776
commit
ceaf0a1b09
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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("正在刷新地图数据,请耐心等待...")
|
||||||
|
Loading…
Reference in New Issue
Block a user