I can write something for you, but need to know more, should the bot join all channels that request it? or should only people with a status in the bot be able to make it join ? should it atlest have XX amount of users in the channel ? should the bot have op in the channel ? if the bot gets deoped, should it leav the channel? should the bot have the ability to gain op true Q ? give some feedback.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }