<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url(self) -> str: """ Get URL for the message :return: str """

        if self.chat.type not in [ChatType.SUPER_GROUP, ChatType.CHANNEL]:
            raise TypeError('Invalid chat type!')
        elif not self.chat.username:
            raise TypeError('This chat does not have @username')

        return f"https://t.me/{self.chat.username}/{self.message_id}"