Class Logging

java.lang.Object
net.bonn2.modules.Module
net.bonn2.modules.logging.Logging

public class Logging extends Module
  • Constructor Details

    • Logging

      public Logging()
  • Method Details

    • register

      public static void register(@NotNull @NotNull Module module, String channel)
      Register a logging channel to the logger
      Parameters:
      module - The module requesting the registration
      channel - The name of the channel
    • log

      public static void log(String channel, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.utils.messages.MessageCreateData message)
      Log a message to a configured channel to a specific guild
      Parameters:
      channel - The registered channel
      guild - The guild to send the message to
      message - The message to send
    • log

      public static void log(String channel, net.dv8tion.jda.api.utils.messages.MessageCreateData message)
      Log a message to a configured channel in all guilds that the bot is in.
      Parameters:
      channel - The registered channel
      message - The message to send
    • registerLoggingChannels

      public void registerLoggingChannels()
      Specified by:
      registerLoggingChannels in class Module
    • registerSettings

      public void registerSettings()
      Specified by:
      registerSettings in class Module
    • load

      public void load()
      Specified by:
      load in class Module
    • getCommands

      public net.dv8tion.jda.api.interactions.commands.build.CommandData[] getCommands()
      Specified by:
      getCommands in class Module