Class JavacordCommandSender

    • Constructor Summary

      Constructors 
      Constructor Description
      JavacordCommandSender​(@NonNull org.javacord.api.event.message.MessageCreateEvent event)
      Commandsender used for all javacord commands executed.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NonNull org.javacord.api.entity.message.MessageAuthor getAuthor()
      Gets the author of the message which triggered the event
      @NonNull org.javacord.api.event.message.MessageCreateEvent getEvent()
      Gets the event which triggered the command
      @NonNull org.javacord.api.entity.message.Message getMessage()
      Gets the message of the event.
      @NonNull org.javacord.api.entity.channel.TextChannel getTextChannel()
      Gets the textchannel the message was sent in
      @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendErrorMessage​(@Nullable java.lang.String message)
      Sends an error message to the executor of the command
      @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendMessage​(@Nullable java.lang.String message)
      Sends a message to the executor of the command
      @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendSuccessMessage​(@Nullable java.lang.String message)
      Sends a success message to the executor of the command
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavacordCommandSender

        public JavacordCommandSender​(@NonNull org.javacord.api.event.message.MessageCreateEvent event)
        Commandsender used for all javacord commands executed.
        Parameters:
        event - The event which triggered the command
    • Method Detail

      • getAuthor

        public @NonNull org.javacord.api.entity.message.MessageAuthor getAuthor()
        Gets the author of the message which triggered the event
        Returns:
        The author of the message
      • getMessage

        public @NonNull org.javacord.api.entity.message.Message getMessage()
        Gets the message of the event.
        Returns:
        The message of the event.
      • getTextChannel

        public @NonNull org.javacord.api.entity.channel.TextChannel getTextChannel()
        Gets the textchannel the message was sent in
        Returns:
        The textchannel of the event
      • getEvent

        public @NonNull org.javacord.api.event.message.MessageCreateEvent getEvent()
        Gets the event which triggered the command
        Returns:
        The event of the command
      • sendMessage

        public @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendMessage​(@Nullable java.lang.String message)
        Sends a message to the executor of the command
        Parameters:
        message - message which should be sent
        Returns:
        The sent message
      • sendErrorMessage

        public @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendErrorMessage​(@Nullable java.lang.String message)
        Sends an error message to the executor of the command
        Parameters:
        message - message which should be sent
        Returns:
        The sent message
      • sendSuccessMessage

        public @NonNull java.util.concurrent.CompletableFuture<org.javacord.api.entity.message.Message> sendSuccessMessage​(@Nullable java.lang.String message)
        Sends a success message to the executor of the command
        Parameters:
        message - message which should be sent
        Returns:
        The sent message