discord.invite module

class discord.invite.Invite(code, guild_id, channel, created_at, temporary, uses, max_uses, max_age, inviter_id)[source]

Bases: object

A discord invite as described here: https://discordapp.com/developers/docs/resources/invite#invite-object

Parameters:
  • content – The contents of the message.
  • channel_id – The id of the channel the message will be written to.
  • author_id – The unique id of the user who sent/sends the message.
  • username – The current username#discriminator combo for that user.
  • timestamp – The time of the message.
  • attachment – The file that will be attached to the message.
static from_json(json_data)[source]

Creates an Invite from a json object by extracting relevant items.

Parameters:json_data – An invite item encoded as a json object.
Returns:An Invite.