🐛 Fix incorrect passing of context

This commit is contained in:
洛水居室 2023-03-14 12:19:09 +08:00
parent 21db8bb85d
commit 7805a2879e
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ class PluginFuncs:
return file_path if return_path else Path(file_path).as_uri()
@staticmethod
def get_args(context: Optional[CallbackContext] = None) -> List[str]:
def get_args(context: CallbackContext) -> List[str]:
args = context.args
match = context.match

View File

@ -61,7 +61,7 @@ class BirthdayPlugin(Plugin):
return (self.birthday_list.get(key, [])).copy()
@handler.command(command="birthday", block=False)
async def command_start(self, update: Update, _: CallbackContext) -> None:
async def command_start(self, update: Update, context: CallbackContext) -> None:
message = update.effective_message
user = update.effective_user
key = (
@ -69,7 +69,7 @@ class BirthdayPlugin(Plugin):
+ "_"
+ rm_starting_str(datetime.now().strftime("%d"), "0")
)
args = self.get_args()
args = self.get_args(context)
if len(args) >= 1:
msg = args[0]