Class WrapCommand

java.lang.Object
java.lang.Thread
com.github.mafelp.commands.WrapCommand
All Implemented Interfaces:
java.lang.Runnable

public class WrapCommand
extends java.lang.Thread
The class that handles asynchronous execution of the Unwrap command.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Thread

    java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
  • Field Summary

    Fields
    Modifier and Type Field Description
    private Command command
    The command which was being parsed with the CommandParser command parser.
    private static org.apache.logging.log4j.Logger logger
    The logger which is used to log statements to the console.
    private org.javacord.api.event.message.MessageCreateEvent messageCreateEvent
    The Event that is being passed to this class by the discord API.
    private static long threadID
    The number of threads of this kind that were being created.

    Fields inherited from class java.lang.Thread

    MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
  • Constructor Summary

    Constructors
    Constructor Description
    WrapCommand​(org.javacord.api.event.message.MessageCreateEvent messageCreateEvent)
    The "Default" Constructor
  • Method Summary

    Modifier and Type Method Description
    void run()
    The method handles the actual execution of this command.
    private void sendHelpEmbed​(boolean addReaction)
    Sends the help embed to the channel in which the original message was sent to.
    private void sendReceiverErrorEmbed()
    Sends a receiver error embed, which says, that no user was found with this id, or that the argument passed in is not a valid id.

    Methods inherited from class java.lang.Thread

    activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
      The logger which is used to log statements to the console.
    • threadID

      private static long threadID
      The number of threads of this kind that were being created.
    • messageCreateEvent

      private final org.javacord.api.event.message.MessageCreateEvent messageCreateEvent
      The Event that is being passed to this class by the discord API.
    • command

      private Command command
      The command which was being parsed with the CommandParser command parser.
  • Constructor Details

    • WrapCommand

      public WrapCommand​(org.javacord.api.event.message.MessageCreateEvent messageCreateEvent)
      The "Default" Constructor
      Parameters:
      messageCreateEvent - The Event that is being passed to this class by the discord API.
  • Method Details

    • run

      public void run()
      The method handles the actual execution of this command.
      Specified by:
      run in interface java.lang.Runnable
      Overrides:
      run in class java.lang.Thread
    • sendHelpEmbed

      private void sendHelpEmbed​(boolean addReaction)
      Sends the help embed to the channel in which the original message was sent to.
      Parameters:
      addReaction - If a negative Reaction should be added to the original message.
    • sendReceiverErrorEmbed

      private void sendReceiverErrorEmbed()
      Sends a receiver error embed, which says, that no user was found with this id, or that the argument passed in is not a valid id.