Add documentation for Preconditions, Aliases, Command Structure
Resolves #223
This commit is contained in:
11
docs/guides/samples/require_context.cs
Normal file
11
docs/guides/samples/require_context.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
[Module]
|
||||
public class InfoModule
|
||||
{
|
||||
// Constrain this command to Guilds
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Whois(IMessage msg, IGuildUser user) { }
|
||||
|
||||
// Constrain this command to either Guilds or DMs
|
||||
[RequireContext(ContextType.Guild | ContextType.DM)]
|
||||
public async Task Info(IMessage msg) { }
|
||||
}
|
||||
Reference in New Issue
Block a user