Example #1
0
 def channels_invites_create(self, channel, max_age=86400, max_uses=0, temporary=False, unique=False):
     r = self.http(Routes.CHANNELS_INVITES_CREATE, dict(channel=channel), json={
         'max_age': max_age,
         'max_uses': max_uses,
         'temporary': temporary,
         'unique': unique
     })
     return Invite.create(self.client, r.json())
Example #2
0
 def invites_delete(self, invite):
     r = self.http(Routes.INVITES_DELETE, dict(invite=invite))
     return Invite.create(self.client, r.json())
Example #3
0
 def invites_get(self, invite):
     r = self.http(Routes.INVITES_GET, dict(invite=invite))
     return Invite.create(self.client, r.json())
Example #4
0
 def invites_delete(self, invite, reason=None):
     r = self.http(Routes.INVITES_DELETE, dict(invite=invite), headers=_reason_header(reason))
     return Invite.create(self.client, r.json())
Example #5
0
 def create_invite(self, *args, **kwargs):
     from disco.types.invite import Invite
     return Invite.create(self, *args, **kwargs)
Example #6
0
 def invites_get(self, invite, with_counts=None):
     r = self.http(Routes.INVITES_GET, dict(invite=invite), params=optional(with_counts=with_counts))
     return Invite.create(self.client, r.json())