Reduced command module lifetime to a single command execution. Removed ModuleAttribute.
This commit is contained in:
15
src/Discord.Net.Commands/ModuleBase.cs
Normal file
15
src/Discord.Net.Commands/ModuleBase.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Discord.Commands
|
||||
{
|
||||
public abstract class ModuleBase
|
||||
{
|
||||
public IDiscordClient Client { get; internal set; }
|
||||
public CommandContext Context { get; internal set; }
|
||||
|
||||
protected virtual async Task ReplyAsync(string message, bool isTTS = false, RequestOptions options = null)
|
||||
{
|
||||
await Context.Channel.SendMessageAsync(message, isTTS, options).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user