zFast
The "bot" is "player", when you spawn a bot the bot get connected (so in the level waittill( "connected",player)
the player can be a bot).
Call a method onbotconnect do not change how the game behave. The bot spawn and act like a normal player.
There is no such a thing as "spawn_bot" but there is "spawn_player". You can use that and check if its a bot by looking and the variable pers["isBot"]
Like this
onbotconnect(){
for ( ;; )
{
level waittill( "connected", player);
if(isDefined(player.pers["isBot"]) && player.pers["isBot"])
{
player thread onbotspawned();
}
}
}