(req dto.AgentIDReq)
| 145 | } |
| 146 | |
| 147 | func (a AgentService) GetDiscordConfig(req dto.AgentIDReq) (*dto.AgentDiscordConfig, error) { |
| 148 | agent, _, err := a.loadAgentAndInstall(req.AgentID) |
| 149 | if err != nil { |
| 150 | return nil, err |
| 151 | } |
| 152 | if agent.AgentType == constant.AppHermesAgent { |
| 153 | return readHermesDiscordChannelConfig(path.Dir(agent.ConfigPath)) |
| 154 | } |
| 155 | conf, err := readOpenclawConfig(agent.ConfigPath) |
| 156 | if err != nil { |
| 157 | return nil, err |
| 158 | } |
| 159 | result := extractDiscordConfig(conf) |
| 160 | return &result, nil |
| 161 | } |
| 162 | |
| 163 | func (a AgentService) UpdateDiscordConfig(req dto.AgentDiscordConfigUpdateReq) error { |
| 164 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected