Skip to content
Advertisement

Discord.py get uses and author from an invite

I would like to get all the invites from a discord server. I get all the invite but I want to get the author and the uses from it. Everything works just fine except the guild.uses.

Tried to embed the things from the discord API.

“””From discord api https://discordpy.readthedocs.io/en/latest/api.html

Attribute & Method

max_age abc.GuildChannel.invites(), Guild.invites()

max_uses abc.GuildChannel.invites(), Guild.invites()

created_at abc.GuildChannel.invites(), Guild.invites()

temporary abc.GuildChannel.invites(), Guild.invites()

uses abc.GuildChannel.invites(), Guild.invites()

approximate_member_count Client.fetch_invite()

approximate_presence_count Client.fetch_invite() “””

JavaScript

Advertisement

Answer

Simply use the Invite.inviter and Invite.uses attributes

JavaScript
Advertisement