Skip to main content

Handling your donation in real time

Project description

Get token

Get client_id and client_secret - here

import donationalerts

auth = donationalerts.Authorization("CLIENT_ID", "CLIENT_SECRET")
auth.start_authorization()

Test application

Donation notifer

import donationalerts
import win10toast

token = "YOUR_TOKEN_HERE"
donation = donationalerts.DonationAlerts(token)
notify = win10toast.ToastNotifier()


@donation.handler
def on_donate(donation_data):
    notify.show_toast(
        title=f"{donation_data['username']} donated {donation_data['amount']}{donation_data['currency']}!",
        msg=donation_data["message"],
        duration=10
    )


if __name__ == "__main__":
    donation.polling()

by @cxldxice with ♥

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

donationalerts-1.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page