Table of Contents

Class CommandModule<TContext>

Namespace
NetCord.Services.Commands
Assembly
NetCord.Services.dll

Represents a module for commands.

public abstract class CommandModule<TContext> : BaseCommandModule<TContext> where TContext : ICommandContext

Type Parameters

TContext

The context the invoked commands use.

Inheritance
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

replyMessage ReplyMessageProperties

The message to reply with.

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<RestMessage>

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

message MessageProperties

The content and properties of the message to send.

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<RestMessage>