Introduces comprehensive invite handling capabilities including creation, deletion, and retrieval operations. Implements invite data model with proper parsing and representation methods to handle Discord invite objects and their metadata. Provides HTTP client methods for all invite-related API endpoints with appropriate error handling and response processing. Includes documentation with practical examples for common invite operations.
427 B
427 B
Working with Invites
The library exposes helper methods for creating and deleting invites.
Create an Invite
invite = await client.create_invite("1234567890", {"max_age": 3600})
print(invite.code)
Delete an Invite
await client.delete_invite(invite.code)
List Invites
invites = await client.fetch_invites("1234567890")
for inv in invites:
print(inv.code, inv.uses)