Interface MessageCommandContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,CommandContext,EventContext,MessageBasedContext,MessageCreateEventContext,MessageEventContext,MessageIncludedContext,RepliableContext
- All Known Implementing Classes:
MessageContextImpl
The execution context of an command invoked through a message.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the raw argument string as it was received, before being split.Retrieves the user that called the command as a guild member as provided by the triggering event, if present.default Mono<MessageChannel>channel()Retrieves the raw arguments received, keyed by the corresponding parameter name.rawArgs()Retrieves the raw arguments received before parsing, in the order that they were received.Methods inherited from interface dev.sympho.bot_utils.access.AccessContext
asGuild, isPrivateMethods inherited from interface dev.sympho.bot_utils.access.ChannelAccessContext
asUserMethods inherited from interface dev.sympho.bot_utils.event.ChannelEventContext
belongs, belongs, belongs, belongs, hasAccess, hasAccess, validate, validatorMethods inherited from interface dev.sympho.modular_commands.api.command.context.CommandContext
caller, callerMember, commandInvocation, getArgument, getArgument, getArgument, getContext, invocation, member, member, requireArgument, requireArgument, requireArgument, requireContext, setContext, setContextMethods inherited from interface dev.sympho.bot_utils.event.EventContext
client, validateMethods inherited from interface dev.sympho.bot_utils.event.MessageCreateEventContext
channelId, event, fetchMessage, guild, guildId, message, messageId, user
-
Method Details
-
channel
- Specified by:
channelin interfaceChannelAccessContext- Specified by:
channelin interfaceCommandContext- Specified by:
channelin interfaceMessageBasedContext- Specified by:
channelin interfaceMessageCreateEventContext
-
callerMember
Description copied from interface:CommandContextRetrieves the user that called the command as a guild member as provided by the triggering event, if present.- Specified by:
callerMemberin interfaceCommandContext- Returns:
- The calling user as a guild member, or
nullif the command was invoked in a private channel.
-
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 forrawArgs().- Returns:
- The received arguments before splitting.
-
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
Retrieves the raw arguments received, keyed by the corresponding parameter name.- Returns:
- The raw arguments received. The returned map is unmodifiable.
-