From 9272405151f5f9d0cc3e1a4860e52a19f1f6ef89 Mon Sep 17 00:00:00 2001 From: zhxy-CN Date: Wed, 2 Nov 2022 00:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Plugin=20birthday=20fix=20a=20bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复每月上旬获取当天信息失败的问题 --- plugins/genshin/birthday.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/genshin/birthday.py b/plugins/genshin/birthday.py index cda1e20..fbf3bae 100644 --- a/plugins/genshin/birthday.py +++ b/plugins/genshin/birthday.py @@ -40,7 +40,11 @@ class BirthdayPlugin(Plugin, BasePlugin): async def command_start(self, update: Update, context: CallbackContext) -> None: message = update.effective_message user = update.effective_user - key = datetime.now().strftime("%m_%d") + key = ( + rm_starting_str(datetime.now().strftime("%m"), "0") + + "_" + + rm_starting_str(datetime.now().strftime("%d"), "0") + ) args = get_all_args(context) if len(args) >= 1: msg = args[0]