[core] Rewrite bot.sub() with docstring