C# Class Nekobot.Commands.CommandBuilder

ファイルを表示 Open project: Kusoneko/Nekobot

Public Methods

Method Description
AddCheck ( Func checkFunc, string errorMsg = null ) : CommandBuilder
AddCheck ( IPermissionChecker check ) : CommandBuilder
Alias ( ) : CommandBuilder
Description ( string description ) : CommandBuilder
Do ( Action func ) : void
Do ( Task>.Func func ) : void
FlagMusic ( bool isMusicRelated ) : CommandBuilder
FlagNsfw ( bool isNsfw ) : CommandBuilder
Hide ( ) : CommandBuilder
Parameter ( string name, ParameterType type = ParameterType.Required ) : CommandBuilder

Private Methods

Method Description
AppendPrefix ( string prefix, string cmd ) : string
Build ( ) : void
CommandBuilder ( Nekobot.Commands.CommandService service, string text, string prefix = "", string category = "", IEnumerable initialChecks = null, bool defaultNsfwFlag = false, bool defaultMusicFlag = false ) : Discord

Method Details

AddCheck() public method

public AddCheck ( Func checkFunc, string errorMsg = null ) : CommandBuilder
checkFunc Func
errorMsg string
return CommandBuilder

AddCheck() public method

public AddCheck ( IPermissionChecker check ) : CommandBuilder
check IPermissionChecker
return CommandBuilder

Alias() public method

public Alias ( ) : CommandBuilder
return CommandBuilder

Description() public method

public Description ( string description ) : CommandBuilder
description string
return CommandBuilder

Do() public method

public Do ( Action func ) : void
func Action
return void

Do() public method

public Do ( Task>.Func func ) : void
func Task>.Func
return void

FlagMusic() public method

public FlagMusic ( bool isMusicRelated ) : CommandBuilder
isMusicRelated bool
return CommandBuilder

FlagNsfw() public method

public FlagNsfw ( bool isNsfw ) : CommandBuilder
isNsfw bool
return CommandBuilder

Hide() public method

public Hide ( ) : CommandBuilder
return CommandBuilder

Parameter() public method

public Parameter ( string name, ParameterType type = ParameterType.Required ) : CommandBuilder
name string
type ParameterType
return CommandBuilder