Package de.presti.ree6.logger.invite
Class InviteContainerManager
java.lang.Object
de.presti.ree6.logger.invite.InviteContainerManager
Utility class to contain every Invite and manage the Invites in our Database.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddInvite(InviteContainer inviteContainer) Methode to add or update an Invitation on the Database.static net.dv8tion.jda.api.entities.InviteconvertVanityInvite(net.dv8tion.jda.api.entities.Guild guild) Convert aVanityInviteto anInvitestatic ArrayList<InviteContainer>getInvites(String guildId) Get every InviteContainer of a Guild.static InviteContainergetRightInvite(net.dv8tion.jda.api.entities.Guild guild) Get the rightInviteContainer.static voidremoveInvite(String guildID, String code) Methode to remove an Invite from the Database.static voidremoveInvite(String guildID, String creator, String code) Methode to remove an Invite from the Database.
-
Method Details
-
addInvite
Methode to add or update an Invitation on the Database.- Parameters:
inviteContainer- theInviteContainerwith the data of the Invite.
-
removeInvite
Methode to remove an Invite from the Database.- Parameters:
guildID- the ID of the Guild.creator- the ID of the Invite creator.code- the Code of the Invite.
-
removeInvite
Methode to remove an Invite from the Database.- Parameters:
guildID- the ID of the Guild.code- the Code of the Invite.
-
convertVanityInvite
public static net.dv8tion.jda.api.entities.Invite convertVanityInvite(net.dv8tion.jda.api.entities.Guild guild) Convert aVanityInviteto anInvite- Parameters:
guild- theGuildtheVanityInviteis from.- Returns:
- the
Invite
-
getRightInvite
Get the rightInviteContainer.- Parameters:
guild- theGuildEntity.- Returns:
- the
InviteContainerof the Invite.
-
getInvites
Get every InviteContainer of a Guild.- Parameters:
guildId- the ID of the Guild.- Returns:
ArrayList<InviteContainer>with every Invite saved in our Database.
-