Bug fixes and improvements #8

Merged
profitroll merged 23 commits from dev into master 2023-01-11 17:22:34 +02:00
Showing only changes of commit 496240c48b - Show all commits

View File

@ -76,7 +76,7 @@ if configGet("enabled", "features", "sponsorships") is True:
try: try:
tg_user = await app.get_users(entry["user"]) tg_user = await app.get_users(entry["user"])
until_expiry = relativedelta(datetime.now(), entry["sponsorship"]["expires"]).days until_expiry = relativedelta(datetime.now(), entry["sponsorship"]["expires"]).days
await app.send_message( tg_user, locale("sponsorships_expires", "message").format(until_expiry) ) # type: ignore await app.send_message( tg_user.id, locale("sponsorships_expires", "message").format(until_expiry) ) # type: ignore
logWrite(f"Notified user that sponsorship expires in {until_expiry} days") logWrite(f"Notified user that sponsorship expires in {until_expiry} days")
except Exception as exp: except Exception as exp:
logWrite(f"Could not find user {entry['user']} notify about sponsorship expiry due to '{exp}'") logWrite(f"Could not find user {entry['user']} notify about sponsorship expiry due to '{exp}'")