Class InviteContainerManager

java.lang.Object
de.presti.ree6.logger.invite.InviteContainerManager

public class InviteContainerManager extends Object
Utility class to contain every Invite and manage the Invites in our Database.
  • Method Details

    • addInvite

      public static void addInvite(InviteContainer inviteContainer)
      Methode to add or update an Invitation on the Database.
      Parameters:
      inviteContainer - the InviteContainer with the data of the Invite.
    • removeInvite

      public static void removeInvite(String guildID, String creator, String code)
      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

      public static void removeInvite(String guildID, String code)
      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 a VanityInvite to an Invite
      Parameters:
      guild - the Guild the VanityInvite is from.
      Returns:
      the Invite
    • getRightInvite

      public static InviteContainer getRightInvite(net.dv8tion.jda.api.entities.Guild guild)
      Get the right InviteContainer.
      Parameters:
      guild - the Guild Entity.
      Returns:
      the InviteContainer of the Invite.
    • getInvites

      public static ArrayList<InviteContainer> getInvites(String guildId)
      Get every InviteContainer of a Guild.
      Parameters:
      guildId - the ID of the Guild.
      Returns:
      ArrayList<InviteContainer> with every Invite saved in our Database.