Breakout bot code into PMBot module