<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_pubmsg(self, c, e):
 """ This function runs when the bot receives a public message. """

        text = e.arguments[0]
        metadata = self.set_metadata(e)
        metadata['is_private_message'] = False
        message = Message(text=text, metadata=metadata).__dict__
        self.baseplate.tell(message)