Interface MessageCommandContext

All Superinterfaces:
AccessContext, AccessValidator, ChannelAccessContext, ChannelAccessValidator, ChannelEventContext, CommandContext, EventContext, MessageBasedContext, MessageCreateEventContext, MessageEventContext, MessageIncludedContext, RepliableContext
All Known Implementing Classes:
MessageContextImpl

public interface MessageCommandContext extends CommandContext, MessageCreateEventContext
The execution context of an command invoked through a message.
Since:
1.0
Version:
1.0
  • Method Details

    • channel

      default Mono<MessageChannel> channel()
      Specified by:
      channel in interface ChannelAccessContext
      Specified by:
      channel in interface CommandContext
      Specified by:
      channel in interface MessageBasedContext
      Specified by:
      channel in interface MessageCreateEventContext
    • callerMember

      default @Nullable Member callerMember()
      Description copied from interface: CommandContext
      Retrieves the user that called the command as a guild member as provided by the triggering event, if present.
      Specified by:
      callerMember in interface CommandContext
      Returns:
      The calling user as a guild member, or null if the command was invoked in a private channel.
    • argString

      @Pure String argString()
      Retrieves the raw argument string as it was received, before being split.

      Does not include the command name(s) (see CommandContext.invocation() for that), only the arguments that are later used for rawArgs().

      Returns:
      The received arguments before splitting.
    • rawArgs

      @Pure List<String> rawArgs()
      Retrieves the raw arguments received before parsing, in the order that they were received.
      Returns:
      The raw arguments received. The returned list is unmodifiable.
    • rawArgMap

      @Pure Map<String,String> rawArgMap()
      Retrieves the raw arguments received, keyed by the corresponding parameter name.
      Returns:
      The raw arguments received. The returned map is unmodifiable.