LiveUpdateContribution
- class asyncpraw.models.reddit.live.LiveUpdateContribution(update: asyncpraw.models.LiveUpdate)
Provides a set of contribution functions to LiveUpdate.
- __init__(update: asyncpraw.models.LiveUpdate)
Create an instance of
LiveUpdateContribution
.- Parameters
update – An instance of
LiveUpdate
.
This instance can be retrieved through
update.contrib
where update is aLiveUpdate
instance. E.g.,thread = await reddit.live("ukaeu1ik4sw5") update = await thread.get_update("7827987a-c998-11e4-a0b9-22000b6a88d2") update.contrib # LiveUpdateContribution instance await update.contrib.remove()
- await remove()
Remove a live update.
Usage:
thread = await reddit.live("ydwwxneu7vsa") update = await thread.get_update("6854605a-efec-11e6-b0c7-0eafac4ff094") await update.contrib.remove()
- await strike()
Strike a content of a live update.
thread = await reddit.live("xyu8kmjvfrww") update = await thread.get_update("cb5fe532-dbee-11e6-9a91-0e6d74fabcc4") await update.contrib.strike()
To check whether the update is stricken or not, use
update.stricken
attribute.Note
Accessing lazy attributes on updates (includes
update.stricken
) may raiseAttributeError
. SeeLiveUpdate
for details.