print("LOGGED IN") name = str(input("Enter the name of your homie: ")) homies = client.searchForUsers(name) homie = homies[0] print("Details of your homie\n") print(homie.url) print(homie.uid) print(homie.name) msg = str(input("Message: ")) _confirm = str(input("type CONFIRM if you want to send the message.. ")) if _confirm == "CONFIRM": sent = client.sendMessage(msg, thread_id=homie.uid, thread_type=ThreadType.USER) client.reactToMessage(sent, MessageReaction.LOVE) if sent: print("Message was sent successfully!") outlog = client.logout() if outlog: print("Loggin out...") print("....") print("LOGGED OUT") else: print("Can't log your ass out! ERROR") else: print("What kinda shit is that? ERROR") else: print("What kinda shit is that? ERROR")
client.addUsersToGroup("<user id>", thread_id=thread_id) # Will add the users with IDs `<1st user id>`, `<2nd user id>` and `<3th user id>` to the thread client.addUsersToGroup(["<1st user id>", "<2nd user id>", "<3rd user id>"], thread_id=thread_id) # Will change the nickname of the user `<user_id>` to `<new nickname>` client.changeNickname("<new nickname>", "<user id>", thread_id=thread_id, thread_type=thread_type) # Will change the title of the thread to `<title>` client.changeThreadTitle("<title>", thread_id=thread_id, thread_type=thread_type) # Will set the typing status of the thread to `TYPING` client.setTypingStatus(TypingStatus.TYPING, thread_id=thread_id, thread_type=thread_type) # Will change the thread color to `MESSENGER_BLUE` client.changeThreadColor(ThreadColor.MESSENGER_BLUE, thread_id=thread_id) # Will change the thread emoji to `👍` client.changeThreadEmoji("👍", thread_id=thread_id) # Will react to a message with a 😍 emoji client.reactToMessage("<message id>", MessageReaction.LOVE)
client.addUsersToGroup('<user id>', thread_id=thread_id) # Will add the users with IDs `<1st user id>`, `<2nd user id>` and `<3th user id>` to the thread client.addUsersToGroup(['<1st user id>', '<2nd user id>', '<3rd user id>'], thread_id=thread_id) # Will change the nickname of the user `<user_id>` to `<new nickname>` client.changeNickname('<new nickname>', '<user id>', thread_id=thread_id, thread_type=thread_type) # Will change the title of the thread to `<title>` client.changeThreadTitle('<title>', thread_id=thread_id, thread_type=thread_type) # Will set the typing status of the thread to `TYPING` client.setTypingStatus(TypingStatus.TYPING, thread_id=thread_id, thread_type=thread_type) # Will change the thread color to `MESSENGER_BLUE` client.changeThreadColor(ThreadColor.MESSENGER_BLUE, thread_id=thread_id) # Will change the thread emoji to `👍` client.changeThreadEmoji('👍', thread_id=thread_id) # Will react to a message with a 😍 emoji client.reactToMessage('<message id>', MessageReaction.LOVE)
elif (dayNum == 4): day = "Čtvrtek" elif (dayNum == 5): day = "Pátek" elif (dayNum == 6): day = "Pondělí" elif (dayNum == 7): day = "Pondělí" return day while True: messages = client.fetchThreadMessages(groupId, 1) for message in messages: if "/supl" in str(message): zpravaList.clear() startSupl() client.reactToMessage(message.uid, MessageReaction.HEART) client.send(Message("V " + getday()), groupId, ThreadType.GROUP) for zprava in zpravaList: client.send(Message(zprava), groupId, ThreadType.GROUP) if "/gott" in str(message): client.sendLocalVoiceClips("trezor.mp3", message="", thread_id=groupId, thread_type=ThreadType.GROUP)