Class DiscordServer

java.lang.Object
org.prithvidiamond1.DB.Models.DiscordServer

public class DiscordServer extends Object
This class manages the backend repository (MongoDB Atlas) that holds each Discord server's preferences.
  • Constructor Details

    • DiscordServer

      public DiscordServer(String id, String guildPrefix)
      The constructor for the repository
      Parameters:
      id - the Discord server's ID
      guildPrefix - the Discord server's guild prefix
  • Method Details

    • getId

      public String getId()
      Method to get the Discord server's ID
      Returns:
      the Discord server's ID
    • setId

      public void setId(String id)
      Method to set the Discord server's ID
      Parameters:
      id - the Discord server's ID
    • getGuildPrefix

      public String getGuildPrefix()
      Method to get the Discord server's current guild prefix
      Returns:
      the Discord server's current guild prefix
    • setGuildPrefix

      public void setGuildPrefix(String guildPrefix)
      Method to set the Discord server's current guild prefix
      Parameters:
      guildPrefix - the Discord server's current guild prefix
    • toString

      public String toString()
      Method that overrides the repository's existing toString method
      Overrides:
      toString in class Object
      Returns:
      returns a string with the Discord server's id and current guild prefix