Skip to content

TGeniusFamily/DonationAlertsHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DonationAlertsHandler

Simple example:

from donation_alerts_handler.donation_alerts import Client
from donation_alerts_handler import filters
client = Client("DonationAlerts_TOKEN")

@client.on_donate(filters.minimum_value(1), filters.currency("RUB"), filters.message_prefix("tgc"))
async def on_donate(donate: Donations):
    print("Handled donate", donate)
    donations = await client.donations()
    print(len(donations))


client.run()

You can create your own filters. They needed to return boolean value:

def minimum_value(n: int):
    async def f(donate: Donations):
        return n <= donate.amount

    return f

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages