mirror of
https://github.com/stake-house/poap-reddit-bot.git
synced 2026-01-09 14:07:58 -05:00
pass in event instead of redditor
This commit is contained in:
@@ -29,9 +29,9 @@ class RedditBot:
|
||||
await redditor.load()
|
||||
age = (datetime.utcnow() - datetime.utcfromtimestamp(int(redditor.created_utc))).total_seconds() // 86400 # seconds in a day
|
||||
if redditor.comment_karma + redditor.link_karma < event.minimum_karma:
|
||||
raise InsufficientKarma(redditor)
|
||||
raise InsufficientKarma(event)
|
||||
elif age < event.minimum_age:
|
||||
raise InsufficientAccountAge(redditor)
|
||||
raise InsufficientAccountAge(event)
|
||||
|
||||
async with database.transaction():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user