Skip to content

Commit

Permalink
All arguments in ReplyAsync should be optional
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
foxbot committed Mar 18, 2018
1 parent b70ae41 commit b38dca7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Discord.Net.Commands/ModuleBase.cs
Expand Up @@ -11,7 +11,13 @@ public abstract class ModuleBase<T> : IModuleBase
{
public T Context { get; private set; }

protected virtual async Task<IUserMessage> ReplyAsync(string message, bool isTTS = false, Embed embed = null, RequestOptions options = null)
/// <summary>
/// Sends a message to the source channel
/// </summary>
/// <param name="message">Contents of the message; optional only if <paramref name="embed"/> is specified</param>
/// <param name="isTTS">Specifies if Discord should read this message aloud using TTS</param>
/// <param name="embed">An embed to be displayed alongside the message</param>
protected virtual async Task<IUserMessage> ReplyAsync(string message = null, bool isTTS = false, Embed embed = null, RequestOptions options = null)
{
return await Context.Channel.SendMessageAsync(message, isTTS, embed, options).ConfigureAwait(false);
}
Expand Down

0 comments on commit b38dca7

Please sign in to comment.