Added common code to a super class

Added several methods to bot.php: getListeners(), getListener() and
getCommand()

Change-Id: I1179281401cdaa2a4dcc50e647ec8462219bd265