class MySkype(SkypeEventLoop):
def onEvent(self, event):
if isinstance(event, SkypeNewMessageEvent):
msg = event.msg
chat = msg.chat
chat_topic = chat.topic if hasattr(chat, 'topic') else "No topic"
print(f"Group: {chat_topic}, Sender: {msg.user.name}, Message: {msg.content}")