( host: SlashCommandHost, result: GoalQueueEditResult, )
| 300 | } |
| 301 | |
| 302 | async function handleGoalQueueEditResult( |
| 303 | host: SlashCommandHost, |
| 304 | result: GoalQueueEditResult, |
| 305 | ): Promise<void> { |
| 306 | if (result.kind === 'cancel') { |
| 307 | await showGoalQueueManager(host, result.goalId); |
| 308 | return; |
| 309 | } |
| 310 | |
| 311 | await updateGoalQueueItem(host.requireSession(), { |
| 312 | goalId: result.goalId, |
| 313 | objective: result.objective, |
| 314 | }); |
| 315 | host.track('goal_queue_update'); |
| 316 | await showGoalQueueManager(host, result.goalId); |
| 317 | } |
| 318 | |
| 319 | export async function createGoal( |
| 320 | host: GoalCommandHost, |
no test coverage detected