mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +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()
|
return file_path if return_path else Path(file_path).as_uri()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_args(context: Optional[CallbackContext] = None) -> List[str]:
|
def get_args(context: CallbackContext) -> List[str]:
|
||||||
args = context.args
|
args = context.args
|
||||||
match = context.match
|
match = context.match
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class BirthdayPlugin(Plugin):
|
|||||||
return (self.birthday_list.get(key, [])).copy()
|
return (self.birthday_list.get(key, [])).copy()
|
||||||
|
|
||||||
@handler.command(command="birthday", block=False)
|
@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
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
key = (
|
key = (
|
||||||
@ -69,7 +69,7 @@ class BirthdayPlugin(Plugin):
|
|||||||
+ "_"
|
+ "_"
|
||||||
+ rm_starting_str(datetime.now().strftime("%d"), "0")
|
+ rm_starting_str(datetime.now().strftime("%d"), "0")
|
||||||
)
|
)
|
||||||
args = self.get_args()
|
args = self.get_args(context)
|
||||||
|
|
||||||
if len(args) >= 1:
|
if len(args) >= 1:
|
||||||
msg = args[0]
|
msg = args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user