LiveContributorRelationship

class praw.models.reddit.live.LiveContributorRelationship(thread: _LiveThread)

Provide methods to interact with live threads’ contributors.

__call__() → List[praw.models.reddit.redditor.Redditor]

Return a RedditorList for live threads’ contributors.

Usage:

thread = reddit.live('ukaeu1ik4sw5')
for contributor in thread.contributor():
    print(contributor)
__init__(thread: _LiveThread)

Create a LiveContributorRelationship instance.

Parameters:thread – An instance of LiveThread.

Note

This class should not be initialized directly. Instead obtain an instance via: thread.contributor where thread is a LiveThread instance.

accept_invite()

Accept an invite to contribute the live thread.

Usage:

thread = reddit.live('ydwwxneu7vsa')
thread.contributor.accept_invite()
invite(redditor: Union[str, praw.models.reddit.redditor.Redditor], permissions: Optional[List[str]] = None)

Invite a redditor to be a contributor of the live thread.

Raise praw.exceptions.RedditAPIException if the invitation already exists.

Parameters:
  • redditor – A redditor name (e.g., 'spez') or Redditor instance.
  • permissions – When provided (not None), permissions should be a list of strings specifying which subset of permissions to grant. An empty list [] indicates no permissions, and when not provided (None), indicates full permissions.

Usage:

thread = reddit.live('ukaeu1ik4sw5')
redditor = reddit.redditor('spez')

# 'manage' and 'settings' permissions
thread.contributor.invite(redditor, ['manage', 'settings'])
Seealso:LiveContributorRelationship.remove_invite() to remove the invite for redditor.
leave()

Abdicate the live thread contributor position (use with care).

Usage:

thread = reddit.live('ydwwxneu7vsa')
thread.contributor.leave()
remove(redditor: Union[str, praw.models.reddit.redditor.Redditor])

Remove the redditor from the live thread contributors.

Parameters:redditor – A redditor fullname (e.g., 't2_1w72') or Redditor instance.

Usage:

thread = reddit.live('ukaeu1ik4sw5')
redditor = reddit.redditor('spez')
thread.contributor.remove(redditor)
thread.contributor.remove('t2_1w72')  # with fullname
remove_invite(redditor: Union[str, praw.models.reddit.redditor.Redditor])

Remove the invite for redditor.

Parameters:redditor – A redditor fullname (e.g., 't2_1w72') or Redditor instance.

Usage:

thread = reddit.live('ukaeu1ik4sw5')
redditor = reddit.redditor('spez')
thread.contributor.remove_invite(redditor)
thread.contributor.remove_invite('t2_1w72')  # with fullname
Seealso:LiveContributorRelationship.invite() to invite a redditor to be a contributor of the live thread.
update(redditor: Union[str, praw.models.reddit.redditor.Redditor], permissions: Optional[List[str]] = None)

Update the contributor permissions for redditor.

Parameters:
  • redditor – A redditor name (e.g., 'spez') or Redditor instance.
  • permissions – When provided (not None), permissions should be a list of strings specifying which subset of permissions to grant (other permissions are removed). An empty list [] indicates no permissions, and when not provided (None), indicates full permissions.

For example, to grant all permissions to the contributor, try:

thread = reddit.live('ukaeu1ik4sw5')
thread.contributor.update('spez')

To grant ‘access’ and ‘edit’ permissions (and to remove other permissions), try:

thread.contributor.update('spez', ['access', 'edit'])

To remove all permissions from the contributor, try:

subreddit.moderator.update('spez', [])
update_invite(redditor: Union[str, praw.models.reddit.redditor.Redditor], permissions: Optional[List[str]] = None)

Update the contributor invite permissions for redditor.

Parameters:
  • redditor – A redditor name (e.g., 'spez') or Redditor instance.
  • permissions – When provided (not None), permissions should be a list of strings specifying which subset of permissions to grant (other permissions are removed). An empty list [] indicates no permissions, and when not provided (None), indicates full permissions.

For example, to set all permissions to the invitation, try:

thread = reddit.live('ukaeu1ik4sw5')
thread.contributor.update_invite('spez')

To set ‘access’ and ‘edit’ permissions (and to remove other permissions) to the invitation, try:

thread.contributor.update_invite('spez', ['access', 'edit'])

To remove all permissions from the invitation, try:

thread.contributor.update_invite('spez', [])