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 void
addInvite
(InviteContainer inviteContainer) Methode to add or update an Invitation on the Database.static net.dv8tion.jda.api.entities.Invite
convertVanityInvite
(net.dv8tion.jda.api.entities.Guild guild) Convert aVanityInvite
to anInvite
static ArrayList<InviteContainer>
getInvites
(String guildId) Get every InviteContainer of a Guild.static InviteContainer
getRightInvite
(net.dv8tion.jda.api.entities.Guild guild) Get the rightInviteContainer
.static void
removeInvite
(String guildID, String code) Methode to remove an Invite from the Database.static void
removeInvite
(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
- theInviteContainer
with 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 aVanityInvite
to anInvite
- Parameters:
guild
- theGuild
theVanityInvite
is from.- Returns:
- the
Invite
-
getRightInvite
Get the rightInviteContainer
.- Parameters:
guild
- theGuild
Entity.- Returns:
- the
InviteContainer
of 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.
-