FAQ rework, replacing outdated info, better interaction FAQ (#2106)
* FAQ rework, replacing outdated info, better interaction faq * Update docs/faq/basics/getting-started.md Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com> * Update docs/faq/basics/getting-started.md Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com> * Update docs/faq/int_framework/general.md Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com> * fix TOC reference Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com> Co-authored-by: Quin Lynch <lynchquin@gmail.com>
This commit is contained in:
20
docs/faq/text_commands/samples/Remainder.cs
Normal file
20
docs/faq/text_commands/samples/Remainder.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Input:
|
||||
// !echo Coffee Cake
|
||||
|
||||
// Output:
|
||||
// Coffee Cake
|
||||
[Command("echo")]
|
||||
public Task EchoRemainderAsync([Remainder]string text) => ReplyAsync(text);
|
||||
|
||||
// Output:
|
||||
// CommandError.BadArgCount
|
||||
[Command("echo-hassle")]
|
||||
public Task EchoAsync(string text) => ReplyAsync(text);
|
||||
|
||||
// The message would be seen as having multiple parameters,
|
||||
// while the method only accepts one.
|
||||
// Wrapping the message in quotes solves this.
|
||||
// This way, the system knows the entire message is to be parsed as a
|
||||
// single String.
|
||||
// e.g.,
|
||||
// !echo "Coffee Cake"
|
||||
Reference in New Issue
Block a user