Bug fixes and improvements #8
@ -76,7 +76,7 @@ if configGet("enabled", "features", "sponsorships") is True:
|
||||
try:
|
||||
tg_user = await app.get_users(entry["user"])
|
||||
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")
|
||||
except Exception as exp:
|
||||
logWrite(f"Could not find user {entry['user']} notify about sponsorship expiry due to '{exp}'")
|
||||
|
Reference in New Issue
Block a user