From b38dca7803806a46f51395b2c0673500eda25755 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Sun, 18 Mar 2018 15:48:34 -0400 Subject: [PATCH] All arguments in ReplyAsync should be optional To reply with just a rich embed, users have to invoke ReplyAsync with `ReplyAsync("", embed: embed)`, which seems wasteful, when they only need to specify the embed. --- src/Discord.Net.Commands/ModuleBase.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/ModuleBase.cs b/src/Discord.Net.Commands/ModuleBase.cs index c35a3cf67..3e6fbbd9b 100644 --- a/src/Discord.Net.Commands/ModuleBase.cs +++ b/src/Discord.Net.Commands/ModuleBase.cs @@ -11,7 +11,13 @@ namespace Discord.Commands { public T Context { get; private set; } - protected virtual async Task ReplyAsync(string message, bool isTTS = false, Embed embed = null, RequestOptions options = null) + /// + /// Sends a message to the source channel + /// + /// Contents of the message; optional only if is specified + /// Specifies if Discord should read this message aloud using TTS + /// An embed to be displayed alongside the message + protected virtual async Task ReplyAsync(string message = null, bool isTTS = false, Embed embed = null, RequestOptions options = null) { return await Context.Channel.SendMessageAsync(message, isTTS, embed, options).ConfigureAwait(false); }