mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-17 04:39:55 +01:00
Add payment filters
This commit is contained in:
parent
d4f2f2e077
commit
630b63ec10
1 changed files with 14 additions and 0 deletions
|
@ -263,3 +263,17 @@ class Filters(object):
|
|||
return message.chat.type in [Chat.GROUP, Chat.SUPERGROUP]
|
||||
|
||||
group = _Group()
|
||||
|
||||
class _Invoice(BaseFilter):
|
||||
|
||||
def filter(self, message):
|
||||
return bool(message.invoice)
|
||||
|
||||
invoice = _Invoice()
|
||||
|
||||
class _SuccessfulPayment(BaseFilter):
|
||||
|
||||
def filter(self, message):
|
||||
return bool(message.successful_payment)
|
||||
|
||||
successful_payment = _SuccessfulPayment()
|
||||
|
|
Loading…
Add table
Reference in a new issue