Browse Source

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.
tags/2.0
Christopher F 7 years ago
parent
commit
b38dca7803
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/Discord.Net.Commands/ModuleBase.cs

+ 7
- 1
src/Discord.Net.Commands/ModuleBase.cs View File

@@ -11,7 +11,13 @@ namespace Discord.Commands
{
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);
}


Loading…
Cancel
Save