Kill a command that doesn't terminate itself when its log shows that it's done

Your CI test should set up the bot, run the tests, and tear it down (including terminating the bot) when the tests are complete. Waiting for user input indefinitely should not be a part of your CI setup, because they will not come. (Some tools such as expect allows you to fake the user inputs.)