docs: add example of custom error message to sample
This commit is contained in:
@@ -59,5 +59,10 @@ namespace _02_commands_framework.Modules
|
|||||||
[Command("list")]
|
[Command("list")]
|
||||||
public Task ListAsync(params string[] objects)
|
public Task ListAsync(params string[] objects)
|
||||||
=> ReplyAsync("You listed: " + string.Join("; ", objects));
|
=> ReplyAsync("You listed: " + string.Join("; ", objects));
|
||||||
|
|
||||||
|
[Command("guild_only")]
|
||||||
|
[RequireContext(ContextType.Guild, ErrorMessage = "Sorry, this command must be ran from within a server, not a DM!")]
|
||||||
|
public Task GuildOnlyCommand()
|
||||||
|
=> ReplyAsync("Nothing to see here!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user