🐛 Plugin birthday fix a bug

修复每月上旬获取当天信息失败的问题
This commit is contained in:
zhxy-CN 2022-11-02 00:47:25 +08:00 committed by GitHub
parent 7cd2579bc8
commit 9272405151
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]