mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🐛 Fix incorrect passing of context
This commit is contained in:
parent
21db8bb85d
commit
7805a2879e
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user