PaiGram/utils/bot.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
369 B
Python
Raw Normal View History

2022-07-30 12:53:28 +00:00
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 []