feat(controller): add help command with message template for bot commands
This commit is contained in:
@@ -55,6 +55,8 @@ func (m *Manager) RouteCommand(cmd Command) (string, error) {
|
||||
}
|
||||
|
||||
switch cmd.Command {
|
||||
case "help":
|
||||
return handleHelp()
|
||||
case "list":
|
||||
return handleList()
|
||||
case "status":
|
||||
@@ -72,6 +74,12 @@ func (m *Manager) RouteCommand(cmd Command) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func handleHelp() (string, error) {
|
||||
cfg := config.GetConfig()
|
||||
params := template.BuildBotInitializationMsgParams()
|
||||
return template.Render(cfg.ControllerMessage.BotHelp, params), nil
|
||||
}
|
||||
|
||||
func handleList() (string, error) {
|
||||
cfg := config.GetConfig()
|
||||
params := template.BuildParamsFromServerList()
|
||||
|
||||
Reference in New Issue
Block a user