If you want to add messages to slack from your own modules or hooks, you can use the module function. The function is globally available.
slackforwhmcs_putMessageIntoQueue ($Message, $Receiver) // $Receiver = e.g. "#channel@Botname" or "@person@BotName