mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-29 02:57:22 +00:00
17 lines
369 B
Python
17 lines
369 B
Python
|
from typing import List
|
||
|
|
||
|
from telegram.ext import CallbackContext
|
||
|
|
||
|
|
||
|
def get_all_args(context: CallbackContext) -> List[str]:
|
||
|
args = context.args
|
||
|
match = context.match
|
||
|
if args is None:
|
||
|
if match is not None:
|
||
|
groups = match.groups()
|
||
|
return list(groups)
|
||
|
else:
|
||
|
if len(args) >= 1:
|
||
|
return args
|
||
|
return []
|