docs: Clarify command samples (#1257)
* Clarify command samples by adding additional notes about each methods * Add additional notes for the Program class * Change wording on token read * Change prefix sample to match referenced example Co-Authored-By: Still34 <341464@gmail.com>
This commit is contained in:
@@ -60,6 +60,7 @@ namespace _02_commands_framework.Modules
|
||||
public Task ListAsync(params string[] objects)
|
||||
=> ReplyAsync("You listed: " + string.Join("; ", objects));
|
||||
|
||||
// Setting a custom ErrorMessage property will help clarify the precondition error
|
||||
[Command("guild_only")]
|
||||
[RequireContext(ContextType.Guild, ErrorMessage = "Sorry, this command must be ran from within a server, not a DM!")]
|
||||
public Task GuildOnlyCommand()
|
||||
|
||||
Reference in New Issue
Block a user