fix: stop invoking bot twice #1

Merged
SethFalco merged 1 commit from run-twice into main 2026-01-18 16:29:13 +00:00
SethFalco commented 2026-01-18 16:28:16 +00:00 (Migrated from gitlab.com)

In assignment 02, I previously had a poor implementation in the constructor.

We were calling #run twice:

  • In the constructor.
  • But then also externally.

However, it was intended to be called externally only. So the bot class is constructed, commands can be registered, then the bot can actually be started.

This resolves both issues:

  1. Moves the code from the constructor into the #start function.
  2. While I was at it, I renamed run to start as I thought it was clearer.
In assignment 02, I previously had a poor implementation in the `constructor`. We were calling `#run` twice: * In the constructor. * But then also externally. However, it was intended to be called externally only. So the bot class is constructed, commands can be registered, then the bot can actually be started. This resolves both issues: 1. Moves the code from the constructor into the `#start` function. 2. While I was at it, I renamed `run` to `start` as I thought it was clearer.
SethFalco commented 2026-01-18 16:29:13 +00:00 (Migrated from gitlab.com)

mentioned in commit a6a07840c2

mentioned in commit a6a07840c21bae6a8e3605e58ef80b3f38a23e51
SethFalco (Migrated from gitlab.com) merged commit a6a07840c2 into main 2026-01-18 16:29:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/agentic-ai-test-suite!1
No description provided.