Class CommandModule<TContext>
Represents a module for commands.
public abstract class CommandModule<TContext> : BaseCommandModule<TContext> where TContext : ICommandContext
Type Parameters
TContextThe context the invoked commands use.
- Inheritance
-
BaseCommandModule<TContext>CommandModule<TContext>
- Inherited Members
Constructors
CommandModule()
protected CommandModule()
Methods
ReplyAsync(ReplyMessageProperties, RestRequestProperties?, CancellationToken)
Replies to the message, returning the resulting reply.
public Task<RestMessage> ReplyAsync(ReplyMessageProperties replyMessage, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
replyMessageReplyMessagePropertiesThe message to reply with.
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.
Returns
SendAsync(MessageProperties, RestRequestProperties?, CancellationToken)
Sends a new message to the specified text channel.
public Task<RestMessage> SendAsync(MessageProperties message, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
messageMessagePropertiesThe content and properties of the message to send.
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.