Add fetch_invite with with_expiration

This commit is contained in:
Nadir Chowdhury
2021-05-01 12:46:16 +01:00
committed by GitHub
parent 4fcbe75d3b
commit e762f55847
3 changed files with 37 additions and 20 deletions

View File

@@ -975,9 +975,10 @@ class HTTPClient:
return self.request(r, reason=reason, json=payload)
def get_invite(self, invite_id, *, with_counts=True):
def get_invite(self, invite_id, *, with_counts=True, with_expiration=True):
params = {
'with_counts': int(with_counts),
'with_expiration': int(with_expiration),
}
return self.request(Route('GET', '/invites/{invite_id}', invite_id=invite_id), params=params)