<reponame>DasPrombelBread/laneBOT-Whatsapp
#!/usr/bin/python3

# PLEASE READ EVERY LINE WHERE I COMMENTED "TODO"! YOU CAN SEARCH IT IN THE TEXT BY USING THE SEARCH TOOL OF YOUR TEXT EDITOR OR IDE!

# INFO
# This Script was made by "DasPrombelBread" (Lane)!
# This program is standing under the MIT license,
# you can copy it and do whatever you want with it.

# Last updated: November 16, 2021

edition = "laneBOT aka Guenni aka Mika : WHATSAPP EDITION" # define which edition of the program it is
version = "5.3.08" # define the version
author = "Lane" # define the name of the creator

conf_file = "/home/pi/timetable/conf.txt" # set the location for config file

config = open(conf_file, 'r').read()
print(config)

if config.__contains__("location=home"):
    location = "home"
elif config.__contains__("holidays=grandpa"):
    location = "grandpa"
else:
    print("LOCATION: Could not find correct arguments in " + conf_file + " using `home` configuration...")
    sleep(5)

import pyautogui as pt # must be manually installed
import pyperclip # must be manually installed (on most systems)
import sys # is installed by default
import os # also installed by default
import subprocess # installed by default
import random # import random. installed by default
from time import sleep # time is also installed by default
from datetime import date, datetime # installed by default
import subprocess # installed by default
import pyautogui # must be manually installed on most systems
from pynput.keyboard import Key, Controller # must be manually installed
keyboard = Controller() # define keyboard as Controller(). this is used by pynput

pyperclip.copy("") # empty the clipboard
automatic = "no"
lang = "de" # set language to german by default

if location == "home":
    print("at home")
    chat_beginning = 775, 960
    move_rel = 820, 1
    logs = 450, 300 
    group1 = 450, 230
    group2 = 450, 370
    
elif location == "grandpa":
    print("at grandpa's")
    chat_beginning = 505, 668
    move_rel = 780, 1
    logs = 300, 280
    group1 = 300, 200
    group2 = 300, 363
    
else:
    print("could not find location, using home")
    chat_beginning = 775, 960
    move_rel = 820, 2
    logs = 450, 300
    group1 = 450, 230
    group2 = 450, 370 

def start_reloader():
    subprocess.Popen("bot_reloader")
start_reloader()

def start_whatsapp():
    subprocess.Popen("whatsapp")
    sleep(40)
    
    # write logs
    pt.moveTo(logs)
    sleep(.4)
    pt.click()
    sleep(2)
    pyperclip.copy("WhatsApp has been Started!")
    sleep(.2)
    pt.keyDown("ctrl") # paste
    sleep(.08) # paste
    pt.press("v") # paste
    sleep(.08) # paste
    pt.keyUp("ctrl") # paste
    sleep(.14)
    pyautogui.press("enter") # send the message
    sleep(.2)
    pt.press("enter")
start_whatsapp()

while True: # an basic while loop, repeat the code written down here 
    def bot_main():
        # pt.press("pagedown") # press "pagedown"-key to go to the end of the chat
        time_now = datetime.now() 
        date_now = datetime.now().strftime("%w")
        current_time = time_now.strftime("%H:%M:%S") # set the time format
        
        def restart_wa():
            sleep(0.2)
            pt.keyDown("alt")
            sleep(0.2)
            pt.press("f4")
            sleep(0.2)
            pt.keyUp("alt")
            sleep(0.4)
            pyautogui.press("enter")
            sleep(0.5)
            sys.stdout.flush()
            os.execv(sys.argv[0], sys.argv)
            
        def timetable():
            if date_now == "1": # date_now says which day of the week it is. 1 = monday, 2 = tuesday, ...
                day = "monday"
            elif date_now == "2":
                day = "tuesday"
            elif date_now == "3":
                day = "wednesday"
            elif date_now == "4":
                day = "thursday"
            elif date_now == "5":
                day = "friday"
            else:
                day = "weekend"
                print("Weekend!")
                
            if day == "weekend":
                print("Lesgo! (weekend)")
                path = '/home/pi/timetable/weekend.txt' # define the path of the timetable-file
                print("Path: " + path) # print the path to terminal
                timetablecontent = open(path, 'r').read() # open file
                pyperclip.copy(timetablecontent) # copy file to clipboard
                sleep(.5)
                if automatic == "yes":
                    print("starting automatically")
                    pt.moveTo(group1)
                    sleep(.3)
                    pt.click()
                    sleep(1.6)
                else:
                    print("starting by command")
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.2)
                pyautogui.press("enter") # send the message
                pyperclip.copy("") # empty the clipboard
            else:
                print("Lesgo!")
                path = '/home/pi/timetable/' + day + '.txt' # define the path of the timetable-file
                print("Path: " + path) # print the path to terminal
                timetablecontent = open(path, 'r').read() # open file
                pyperclip.copy(timetablecontent) # copy file to clipboard
                sleep(.5)
                if automatic == "yes":
                    print("starting automatically")
                    pt.moveTo(group1)
                    sleep(.3)
                    pt.click()
                    sleep(1.6)
                else:
                    print("starting by command")
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.2)
                pyautogui.press("enter") # send the message
                pyperclip.copy("") # empty the clipboard
        
        if current_time.startswith("06:15:1"): # if current time starts with 06:30:1... am, start "timetable" function, else use the bot
            if config.__contains__("holidays=true"):
                random_count = random.randint(1,6)
                if random_count == 4:
                    print("Timetable!")
                    sleep(10)
                    automatic = "yes"
                    timetable()
                    automatic = "no"
                else:
                    print("Ferien!")
            elif config.__contains__("holidays=false"):
                print("Timetable!")
                sleep(10)
                automatic = "yes"
                timetable()
                automatic = "no"
            else:
                print("TIMETABLE: Could not find correct arguments in " + conf_file + " skipping posting timetable...")
                sleep(10)
                
        elif current_time.startswith("00:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("05:30:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("09:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("11:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("14:30:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("17:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("20:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
            
        else:
            print("No timetable!")
            def copy():
                pt.moveTo(chat_beginning)
                sleep(0.6)
                pt.mouseDown() # press down left mouse button
                sleep(0.3)
                pt.moveRel(move_rel, duration=.22)
                sleep(0.2)
                pt.mouseUp() # stop pressing the left mouse button
                sleep(0.2)
                pt.keyDown("ctrl") # copy the message
                sleep(0.15) # copy the message
                pt.press("c") # copy the message
                sleep(0.15) # copy the message
                pt.keyUp("ctrl") # copy the message
                sleep(0.3)
                pt.click() # click into the void to remove the selection of the last message
            copy()

            whatmsg = pyperclip.paste() # define "whatmsg" with pyperclip.paste (the content in the clipboard)
            if whatmsg.startswith("."):
                lang = "de"
                print("German command input")
            elif whatmsg.startswith("!"):
                lang = "en"
                print("English command input")
            else:
                lang = "de" # set to default again
                print("Last message isn't a command, so no language could be set")
            
            def paste(): # paste and the message
                sleep(.17)
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.14)
                
            def bot_message(): # define the bot_message function
                sleep(.1)
                pt.press("a") # press "a" to automatically get into the text field
                sleep(.1)
                pt.keyDown("backspace") # delete the "a" and all other content that may be in the text field
                sleep(.1)
                pt.keyUp("backspace")
                sleep(.1)
                pt.keyDown("backspace")
                sleep(.1)
                pt.keyUp("backspace")
                sleep(.2)
                pyautogui.keyDown("shift") # put the "shift" key down
                sleep(.1)
                keyboard.press(":") # press the ":" key (only works when shift is down)
                sleep(.1)
                pyautogui.keyUp("shift") # put the "shift" key up
                sleep(.1)
                pyautogui.typewrite("robot") # write "robot", to call the "robot"-emoji
                sleep(.1)
                pyautogui.press("enter") # press enter to enter the "robot"-emoji
                sleep(.1)
                pyautogui.keyDown("shift") # make a ":" again
                keyboard.press(":")
                pyautogui.keyUp("shift")
            
            def send(): # paste and send the message
                bot_message()
                sleep(.17)
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.14)
                pyautogui.press("enter") # send the message
            
            if whatmsg == ".help" or whatmsg == ".hilfe" or whatmsg == "!help" : # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement
                print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                if lang == "de":
                    pyperclip.copy(" Hilfe: http://www.lane-bot.tk/ oder https://is.gd/guenni \n \nInfo: " + edition + ". Version: " + version + ". Made by " + author) # write the info-message (with an interval of 0.1 seconds between every key)
                elif lang == "en":
                    pyperclip.copy(" Help: http://www.lane-bot.tk/ or https://is.gd/guenni \n \nInfo: " + edition + ". Version: " + version + ". Made by " + author) # write the info-message (with an interval of 0.1 seconds between every key)
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".about" or whatmsg == "!about": # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement
                print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                if lang == "de":
                    pyperclip.copy(" Der laneBOT ist aktuell ein WhatsApp- und Discord-Bot, welcher hauptsächlich dazu gedacht ist, diese Klassengruppe Informieren und Unterhalten zu können. Die Discord-Version kann aber auch auf jedem beliebigen anderen Server hinzugefügt werden (Invite-Link auf meiner Webseite). Die WhatsApp-Version richtet sich fast nur auf den Einsatz in meiner Schulklasse. \n\nEin kleiner Nachteil an dem WhatsApp-Bot ist, dass dieser denselben Account benutzt wie ich (Lane), allerdings sind die Nachrichten des Bots erkennbar durch einen Roboter-Emoji am Anfang jeder Nachricht. Weitere Informationen gibt es unter http://www.lane-bot.tk oder https://is.gd/guenni")                    
                elif lang == "en":
                    pyperclip.copy(" Currently, the laneBOT a WhatsApp- and Discord-bot, which is mainly intendet to inform and entertain this group. The Discord-version can also be added to any other server (invite-link on my webseite). The WhatsApp-version is directed almost only for the use in my school class. \n\nA small disatvantage of the WhatsApp-bot is, that it uses the same account as I (Lane), but the messages which come from the bot are recognizable through a robot-emoji on the start of each message. More informations at http://www.lane-bot.tk or https://is.gd/guenni")                    
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".info" or whatmsg == "!info":
                print("Revieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Info : " + edition + ". Version : " + version + ". Made by " + author + " Web: http://www.lane-bot.tk/ oder https://is.gd/guenni")                    
                elif lang == "en":
                    pyperclip.copy(" Info : " + edition + ". Version : " + version + ". Made by " + author + " Web: http://www.lane-bot.tk/ oder https://is.gd/guenni")                    
                else:
                    print("No correct language found, ignoring command...")
                send() 
               
            elif whatmsg.startswith(".oracle") or whatmsg.startswith("!oracle"): # if whatsapp message starts with ".oracle" open this function
                if whatmsg.__contains__("wann") or whatmsg.__contains__("when"): # if the message contains "wann" (german word for "when") do this, else move to next "elif"-statement
                    print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Immer", "Nie", "Gestern", "Vorgestern", "Übermorgen", "Morgen", "Wird nicht vorkommen", "Ist schon passiert"]) # choose a random word as answer
                        pyperclip.copy(' Deine antwort lautet > ' + answer) # type the answer               
                    elif lang == "en":
                        answer = random.choice(["ever", "never", "yesterday", "the day before yesterday", "the day after tomorrow", "tomorrow", "will not happen", "already happened"]) # choose a random word as answer
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer               
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                elif whatmsg.startswith(".oracle wer") or whatmsg.startswith("!oracle who"): # if the message starts with ".oracle wer" ("wer" = german word for "who") do this, else move to "else"-statement
                    print("Recieved message:", whatmsg) # print the revieved messahe to the console (terminal)
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"]) # choose a random name from my school class
                        pyperclip.copy(' Deine antwort lautet > ' + answer) # type the answer                  
                    elif lang == "en":
                        answer = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"]) # choose a random name from my school class
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("Revieved message:", whatmsg) # if the message ditn't include "wann" or "wer", type one of these random answers 
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Ja", "Nein", "Vielleicht", "Immer", "Nie", "Gestern", "Vorgestern", "Uebermorgen", "Wird nicht vorkommen", "Ist schon passiert", "Ja", "Nein", "Ich habe dich leider nicht verstanden.", "Ja", "Nein"]) # choose a random answer
                        pyperclip.copy(' Deine Antwort lautet > ' + answer) # type the answer              
                    elif lang == "en":
                        answer = random.choice(["yes", "no", "maybe", "ever", "never", "yesterday", "the day before yesterday", "the day after tomorrow", "tomorrow", "will not happen", "has already happened", "yes", "no", "sorry, I didn't understand you", "yes", "no"]) # choose a random answer
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer              
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                    
            elif whatmsg == ".spruch" or whatmsg == "!saying":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11", "joke12", "joke13", "joke14", "joke15", "joke16", "joke17", "joke18", "joke19", "joke20", "joke21", "joke22", "joke23", "joke24", "joke25", "joke26", "joke27", "joke28", "joke29", "joke30"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" *Anmachspruch*: 'If she leaves for another, there always her mother'.") # copy the joke to clipboard
                    elif spruch == "joke2":
                        pyperclip.copy(" *Anmachspruch*: 'Ich bin neidisch auf dein Herz, weil es in dir pulsiert und ich nicht'")
                    elif spruch == "joke3":
                        pyperclip.copy(" *Anmachspruch*: Ich glaube deine Beine streiten sich, soll ich dazwischen gehen?")
                    elif spruch == "joke4":
                        pyperclip.copy(" *Anmachspruch*: Na Schnitte, schon belegt?")
                    elif spruch == "joke5":
                        pyperclip.copy(" *Anmachspruch*: Ey Praline schon ne Füllung?")
                    elif spruch == "joke6":
                        pyperclip.copy(" *Anmachspruch*: Ich bin neu in der Stadt kannst du mir den Weg zu dir nach hause zeigen?")
                    elif spruch == "joke7":
                        pyperclip.copy(" *Anmachspruch*: Sind deine Eltern Architekten, oder wieso bist du so gut gebaut?")
                    elif spruch == "joke8":
                        pyperclip.copy(" *Anmachspruch*: Wenn du eine Frucht wärst, wärst du ein Pfirsich weil du so süß bist.")
                    elif spruch == "joke9":
                        pyperclip.copy(" *Anmachspruch*: Bist du Gärtnerin? Weil immer wenn ich dich sehe wächst meine Gurke.")
                    elif spruch == "joke10":
                        pyperclip.copy(" *Anmachspruch:* Deine Lippen sehen sehr alleine aus maybe sollten die sich mal treffen?")
                    elif spruch == "joke11":
                        pyperclip.copy(" *Anmachspruch:* Deine Stimme ist echt geil aber noch geiler wäre es, wenn sie meinen namen stöhnen würde")
                    elif spruch == "joke12":
                        pyperclip.copy(" *Anmachspruch:* Lass es so machen: du gibst mir deinen Pulli, aber du musst ihn mir später auch wieder ausziehen")
                    elif spruch == "joke13":
                        pyperclip.copy(" *Anmachspruch:* Du siehst echt traurig aus... Aber mach dir keine Sorgen, meine Schultern sind immer frei für deine Beine")
                    elif spruch == "joke14":
                        pyperclip.copy(" *Anmachspruch:* Ich kenn mich zwar nicht so gut mit Gewürzen aus, aber du bist scharf")
                    elif spruch == "joke15":
                        pyperclip.copy(" *Anmachspruch:* Du magst schlafen, ich mag schlafen. Vielleicht sollten wir mal zusammen schlafen?")
                    elif spruch == "joke16":
                        pyperclip.copy(" *Anmachspruch:* Ich hab irgendwie mein Kissen verloren, darf ich zwischen deinen Beinen liegen?")
                    elif spruch == "joke17":
                        pyperclip.copy(" *Anmachspruch:* Ich heiße zwar nicht Manuel aber vielleicht bin ich ja dein Neuer-")
                    elif spruch == "joke18":
                        pyperclip.copy(" *Anmachspruch:* Ist irgendwo ein Atomkraftwerk explodiert oder warum hast du so eine krasse Ausstrahlung?")
                    elif spruch == "joke19":
                        pyperclip.copy(" *Anmachspruch:* Gold schmilzt bei 1064 Grad, Titan schmilzt bei 1668 Grad und ich schmelze bei deinem Anblick.")
                    elif spruch == "joke20":
                        pyperclip.copy(" *Anmachspruch:* Ich kann nicht sagen ob du schön bist. Wahre Schönheit kommt von Innen und in dir war ich noch nicht.")
                    elif spruch == "joke21":
                        pyperclip.copy(" *Anmachspruch:* Ich hab Spotify verklagt, weil du nicht unter den heißesten singles bist.")
                    elif spruch == "joke22":
                        pyperclip.copy(" *Anmachspruch:* Ich will dich jetzt nicht dumm anmachen, aber ich hätte nichts dagegen wenn du es machst.")
                    elif spruch == "joke23":
                        pyperclip.copy(" *Anmachspruch:* Wenn Corona dich noch nicht flachgelegt hat, kann ich es auch gerne tun.")
                    elif spruch == "joke24":
                        pyperclip.copy(" *Anmachspruch:* Hast du einen Namen oder kann ich dich direkt `Meins` nennen?")
                    elif spruch == "joke25":
                        pyperclip.copy(" *Anmachspruch:* Auch wenn ich in keiner Gewürzfabrik arbeite, erkenne ich, dass du scharf bist.")
                    elif spruch == "joke26":
                        pyperclip.copy(" *Anmachspruch:* Ich bin zwar kein Magier aber ich zerleg dich trotzdem in der Kiste")
                    elif spruch == "joke27":
                        pyperclip.copy(" *Anmachspruch:* Ich hab meine Decke verloren- darf ich mich heute Nacht an dich kuscheln?")
                    elif spruch == "joke28":
                        pyperclip.copy(" *Anmachspruch:* Du bist so heiß da braucht man sich nicht wundern warum die Gletscher schmelzen")
                    elif spruch == "joke29":
                        pyperclip.copy(" *Anmachspruch:* Wollen wir zusammen heute Nacht die Sterne anschauen? - Ich hol dir dann auch einen runter")
                    elif spruch == "joke30":
                        pyperclip.copy(" *Anmachspruch:* Wir sind wie eine Achterbahn, je schneller du wirst desto lauter werd ich")
                elif lang == "en":
                    pyperclip.copy(" Sayings are not available in english.")
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".cat" or whatmsg == "!cat":
                print("Recieved message:", whatmsg)
                
                cat1 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse1.jpg"
                cat2 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse2.jpg"
                cat3 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse3.jpg"
                cat4 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse4.jpg"
                cat5 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse5.jpg"
                cat6 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse6.jpg"
                cat7 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse7.jpg"
                cat8 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse8.jpg"
                cat9 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse9.jpg"
                cat10 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse10.jpg"
                cat11 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse11.jpg"
                cat12 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse12.jpg"
                cat13 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse13.jpg"
                cat14 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse14.jpg"
                
                cat_list = random.choice([cat1, cat2, cat3, cat4, cat5, cat6, cat7, cat8, cat9, cat10, cat11, cat12, cat13, cat14])
            
                
                if lang == "de":
                    pyperclip.copy(" Kadse: " + cat_list)                   
                elif lang == "en":
                    pyperclip.copy(" Cet: " + cat_list)                   
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".dog" or whatmsg == "!dog":
                print("Recieved message:", whatmsg)
                
                dog1 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau1.jpg"
                dog2 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau2.jpg"
                dog3 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau3.jpg"
                dog4 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau4.jpg"
                dog5 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau5.jpg"
                dog6 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau6.jpg"
                dog7 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau7.jpg"
                dog8 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau8.jpg"
                dog9 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau9.jpg"
                dog10 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau10.jpg"
                dog11 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau11.jpg"
                dog12 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau12.jpg"
                dog13 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau13.jpg"
                dog14 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau14.jpg"
                
                dog_list = random.choice([dog1, dog2, dog3, dog4, dog5, dog6, dog7, dog8, dog9, dog10, dog11, dog12, dog13, dog14])
            
                if lang == "de":
                    pyperclip.copy(" Hühn(d)chen: " + dog_list)                   
                elif lang == "en":
                    pyperclip.copy(" Doggo: " + dog_list)                   
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".wahrheit-oder-pflicht") or whatmsg.startswith(".truth-or-dare") or whatmsg.startswith(".wop") or whatmsg.startswith(".w-o-p") or whatmsg.startswith(".tod") or whatmsg.startswith(".t-o-d") or whatmsg.startswith("!truth-or-dare") or whatmsg.startswith("!wop") or whatmsg.startswith("!w-o-p") or whatmsg.startswith("!tod") or whatmsg.startswith("!t-o-d"):
                print("Recieved message:", whatmsg)
                random_name = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if lang == "de":
                    truth1 = "*Wahrheit*: Was war als Kind deine Lieblingsserie?"
                    truth2 = "*Wahrheit*: Hast du jemals erfolgreich jemanden verführt?"
                    truth3 = "*Wahrheit*: Falls dein Partner 30kg zu nehmen würde, würdest du ihn/sie verlassen?"
                    truth4 = "*Wahrheit*: Würdest du mit jemandem für Geld Sex haben? Und wenn ja, wie viel würdest du verlangen?"
                    truth5 = "*Wahrheit*: Wie viel geld würdest du verlangen, um nackt für eine Kunst-Klasse zu posen?"
                    truth6 = "*Wahrheit*: Beschreibe detailliert welche Unterhose du gerade trägst"
                    truth7 = "*Wahrheit*: Glaubst du, du kannst mit " + random_name + " vier mal nachts Sex haben?"
                    truth8 = "*Wahrheit*: Würdest du in einem Porno mit machen wenn niemand dein Gesicht erkennen kann?"
                    truth9 = "*Wahrheit*: Hast du schon mal die ganze Nacht lange gefeiert und musstest am nächsten Tag in die Schule?"
                    truth10 = "*Wahrheit*: Würdest du mit " + random_name + " aus gehen?"
                    truth11 = "*Wahrheit*: Hast du dich schon einmal geprügelt? Und wenn ja, hast du gewonnen?"
                    truth12 = "*Wahrheit*: Was ist die gefährlichste Sache, die du je getan hast?"
                    truth13 = "*Wahrheit*: Falls du in einer Woche ein Kind bekommen würdest, wie würdest du es nennen?"
                    truth14 = "*Wahrheit*: Was hasst du am meisten an deiner am besten befreundeten Person?"
                    truth15 = "*Wahrheit*: Was hasst du am meisten an dir selbst?"
                    truth16 = "*Wahrheit*: Was hasst du am meisten an " + random_name + "?"
                    truth17 = "*Wahrheit*: Würdest du " + random_name + " für 100 Euro küssen?"
                    truth18 = "*Wahrheit*: Würdest du für eine Nacht lieber eine Person haben, die hot und dumm oder nicht-so-hot und schlau ist? Und was würdest du mit der Person machen?"
                    truth19 = "*Wahrheit*: Was ist dein dunkelstes Geheimnis?"
                    truth20 = "*Wahrheit*: Hast du schon einmal Hentai gesehen oder erotische Geschichten gelesen?"
                    truth21 = "*Wahrheit:* Wo rasierst du dich überall?"
                    truth22 = "*Wahrheit:* Schaust du vor dem Spülen in die Kloschüssel?"
                    truth23 = "*Wahrheit:* Wen hast du zuletzt geküsst?"
                    truth24 = "*Wahrheit:* Hast du schon einmal jemanden gemobbt?"
                    truth25 = "*Wahrheit:* Was war die letzte Lüge, die du jemandem erzählt hast?"
                    truth26 = "*Wahrheit:* Pinkelst du in der Dusche?"
                    truth27 = "*Wahrheit:* Wen aus der Klasse würdest du am ehesten küssen?"
                    truth28 = "*Wahrheit:* Was und mit wem war dein schlechtestes Date?"
                    truth29 = "*Wahrheit:* Was magst du am liebsten an dir?"
                    truth30 = "*Wahrheit:* Was war dein schlimmster Korb?"
                    truth31 = "*Wahrheit:* Was war das schlimmste, das du jemals jemandem angetan hast?"
                    truth32 = "*Wahrheit:* Was ist die schmutzigste Nachricht, die du je verschickt hast?"
                    truth33 = "*Wahrheit:* Was ist deine dunkelste Fantasie?"
                    truth34 = "*Wahrheit:* Schaust du Pornos?"
                    truth35 = "*Wahrheit:* Besitzt du ein Sexspielzeug?"
                    truth36 = "*Wahrheit:* Hattest du schonmal Sex-Fantasien mit jemandem aus unserer Klasse?"
                    truth37 = "*Wahrheit:* Vor was hast du am meisten Angst?"
                    truth38 = "*Wahrheit:* Welches Talent hättest du gerne?"
                    truth39 = "*Wahrheit:* Was isst du am liebsten?"
                    truth40 = "*Wahrheit:* Hast du schon einmal geraucht?"
                    truth41 = "*Wahrheit:* Was ist dein Lieblingsfilm?"
                    truth42 = "*Wahrheit:* Hast du schon einmal etwas gestohlen?"
                    truth43 = "*Wahrheit:* Wann hast du das letzte mal geweint?"
                    truth44 = "*Wahrheit:* Was ist dein Lieblings-Schulfach?"
                    truth45 = "*Wahrheit:* Welches Buch hast du als letztes gelesen?"
                    
                    dare1 = "*Pflicht:* Wickle die nächste Person zu dir in Toilettenpapier ein"
                    dare2 = "*Pflicht:* Versuche, eine eigene Nase abzulecken"
                    dare3 = "*Pflicht:* Küsse die nächste Person rechts von dir auf den Mund"
                    dare4 = "*Pflicht:* Du musst drei Minuten lange alles mit 'Ja' beantworten"
                    dare5 = "*Pflicht:* Gehe zu" + random_name + " und gib der Person eine Ohrfeige"
                    dare6 = "*Pflicht:* Du wirst " + random_name + " von jetzt an so lange 'Schatz' nennen, bis die Person dir sagt dass du aufhören sollst."
                    dare7 = "*Pflicht:* Kratze dein linkes Ohr mit einem deiner Füße wie eine Katze."
                    dare8 = "*Pflicht:* Lege deine Hände für 2 Minuten auf den Kopf und bewege dich nicht."
                    dare9 = "*Pflicht:* Schreibe in den nächsten Chat unter dieser Gruppe 'es ist aus mit uns'"
                    dare10 = "*Pflicht:* Versuche deinen Ellenbogen abzulecken"
                    dare11 = "*Pflicht:* Hüpfe im Kreis um den nächsten Tisch, der genug Platz außenrum bietet."
                    dare12 = "*Pflicht:* Sei kreativ: male etwas lustiges auf den Unterarm von " + random_name + "!"
                    dare13 = "*Pflicht:* Setze für die nächsten 2 Wochen an deinem Handy einen Wecker auf 8 Uhr (morgens)"
                    dare14 = "*Pflicht:* Für die nächsten zwei Minuten musst du jeden satz mit '" + random.choice(["ich liebe dich", "Bratwurst"]) + "' beenden!"
                    dare15 = "*Pflicht:* Schreibe deiner Mutter, dass du eine Sechs in Mathe geschrieben hast."
                    dare16 = "*Pflicht:* "
                    dare17 = "*Pflicht:* "
                    
                    truth_list = random.choice([truth1, truth2, truth3, truth4, truth5, truth6, truth7, truth8, truth9, truth10, truth11, truth12, truth13, truth14, truth15, truth16, truth17, truth18, truth19, truth20, truth21, truth22, truth23, truth24, truth25, truth26, truth27, truth28, truth29, truth30, truth31, truth32, truth33, truth34, truth35, truth36, truth37, truth38, truth39, truth40, truth41, truth42, truth43, truth44, truth45])
                    dare_list = random.choice([dare1, dare2, dare3, dare4, dare5, dare6, dare7, dare8, dare9, dare10, dare11, dare12, dare13, dare14, dare15])
                    
                    if whatmsg.endswith(" truth") or whatmsg.endswith(" wahrheit") or whatmsg.endswith(" w"):
                        pyperclip.copy(" " + truth_list)
                        send()
                    elif whatmsg.endswith(" dare") or whatmsg.endswith(" pflicht") or whatmsg.endswith(" p"):
                        pyperclip.copy(" " + dare_list)
                        send()
                    elif whatmsg == ".truth-or-dare" or whatmsg == ".wahrheit-oder-pflicht" or whatmsg == ".w-o-p" or whatmsg == ".wop":
                        pyperclip.copy(" " + random.choice([truth_list, dare_list]))
                        send()
                    else:
                        pyperclip.copy(" truth-or-dare: *Unknown argument!*")
                        send()
                                  
                elif lang == "en":
                    pyperclip.copy(" Truth or dare is not available in english jet.")
                    send()                   
                else:
                    print("No correct language found, ignoring command...")
                            
            elif whatmsg == ".illegal" or whatmsg == "!illegal":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    illegal = random.choice(["Toete einen Menschen", "Kauf ne Waffe auf einem Darknet Markt", "Sag dass jemand aus der Klasse tiere fckt"])
                    pyperclip.copy(" Richtig illegal : " + illegal)
                elif lang == "en":
                    illegal = random.choice(["kill someone", "buy a weapon on a darknet market", "say that someone in the class is fcking animals"])
                    pyperclip.copy(" Very illegal : " + illegal)                  
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".restart_bot" or whatmsg == "!restart_bot":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Starte bot neu... (dieser Prozess kann bis zu zwei Minuten dauern)")                  
                elif lang == "en":
                    pyperclip.copy(" Restarting bot... (this process may last up to two minutes)")                    
                else:
                    print("No correct language found, ignoring command...")
                send()
                restart_wa()
                
            elif whatmsg == ".online" or whatmsg == "!online":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Offensichtlich online, oder?")                   
                elif lang == "en":
                    pyperclip.copy(" Obviously online, right?")             
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".restartbot" or whatmsg == "!restartbot":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Du darfst diesen Befehl nicht verwenden!")                    
                elif lang == "en":
                    pyperclip.copy(" You are not allowed to use this command!")             
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".würfel" or whatmsg == "!roll" or whatmsg == "!cube" or whatmsg == "!dice":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Ich Würfle...")
                    send()
                    sleep(1)
                    cube_res = random.choice([" Ergebnis: 1", " Ergebnis: 2", " Ergebnis: 3", " Ergebnis: 4", "Ergebnis: 5", " Ergebnis: 6"])
                    pyperclip.copy(cube_res)
                    pyperclip.copy(cube_res)                   
                elif lang == "en":
                    pyperclip.copy(" I roll...")
                    send()
                    sleep(1)
                    cube_res = random.choice([" Result: 1", " Result: 2", " Result: 3", " Result: 4", " Result: 5", " Result: 6"])
                    pyperclip.copy(cube_res)
                    pyperclip.copy(cube_res)                    
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".say") or whatmsg.startswith("!say"):
                print("Recieved message:", whatmsg)
                str = whatmsg
                print ("Original string: " + str) 
                if lang == "de":
                    res_str = str.replace('.say', '')                     
                elif lang == "en":
                    res_str = str.replace('!say', '')                  
                else:
                    print("No correct language found, ignoring command...")
                print ("The string after removal of character: " + res_str)
                sleep(.1)
                pyperclip.copy(res_str)
                send()
            
            elif whatmsg.startswith(".love") or whatmsg.startswith("!love"):
                str = whatmsg
                print ("Original string: " + str) 
                if lang == "de":
                    res_str = str.replace('.love', '')
                    lovemeter_res = random.choice([" Zwischen 0 und 20 Prozent... eher nich so", " Zwischen 20 und 30 Prozent. Das koennte noch was werden", " 30 bis 50 Prozent, nicht super aber schon recht gut!", " 50 bis 60 Prozent. Ein Date koennte helfen!", " 60 bis 80 Prozent!! Ab zum Date!", " 80 bis 99 Prozent! Bist du dir sicher, dass die Personen nicht schon zusammen sind?", " FUCKING 100 PROZENT! AB AUF DIE HOCHZEIT!"])
                elif lang == "en":
                    res_str = str.replace('!love', '')
                    lovemeter_res = random.choice([" Between 0 and 20 percent... not that good", " Between 20 and 30 percent. This could end up in something", " 30 up to 50 percent, not the best but already good!", " 50 up to 60 percent. A date may help!", " 60 up to 80 percent!! Go to your date!", " 80 up to 99 percent! Are you shure that those persons are not together already?", " FUCKING 100 PERCENT! LET'S GO TO THE WEDDING!"])
                else:
                    print("No correct language found, ignoring command...")
                print ("The string after removal of character: " + res_str)
                if whatmsg == ".love":
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(lovemeter_res)
                    send()
                else:
                    print("two")
                    sleep(.1)
                    if lang == "de":
                        pyperclip.copy(" Ergebnis von" + res_str + " :" + lovemeter_res)                    
                    elif lang == "en":
                        pyperclip.copy(" Result of" + res_str + " :" + lovemeter_res)                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()

                
            elif whatmsg.startswith(".queer") or whatmsg.startswith("!queer"):
                print("Revieved message:", whatmsg)
                sleep(.2)
                queer = random.randint(1,100)
                #queer = random.choice(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100!!"])
                sleep(.1)
                if whatmsg == ".queer":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Zu ", queer, " Prozent queer! ")                   
                    elif lang == "en":
                        pyperclip.copy(" To ", queer, " percent queer! ")         
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                elif whatmsg == ".queer Simon" or whatmsg == ".queer simon" or whatmsg == "!queer Simon" or whatmsg == "!queer simon":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" Simon is fuckin homophobic!")
                    send()
                elif whatmsg == ".queer Lane" or whatmsg == ".queer lane" or whatmsg == ".queer Iane" or whatmsg == "!queer Lane"or whatmsg == "!queer lane":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Lane hat ganz klar 100 Prozent!")                  
                    elif lang == "en":
                        pyperclip.copy(" Lane has 100 percent, clearly!")                   
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.3)
                    pyautogui.press("enter")
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.queer', '')
                        sleep(.1)
                        pyperclip.copy(res_str + " ist zu " + queer + " Prozent queer! ")                   
                    elif lang == "en":
                        res_str = str.replace('!queer', '') 
                        sleep(.1)
                        pyperclip.copy(res_str + " is to " + queer + " percent queer! ")                 
                    else:
                        print("No correct language found, ignoring command...")
                    print ("The string after removal of character: " + res_str)
                    paste()
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                
            elif whatmsg.startswith(".paar") or whatmsg.startswith("!couple"):
                lovemeter1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                lovemeter2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if whatmsg == ".paar" or whatmsg == "!couple":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Ein super Paar > " + lovemeter1 + ' und ' + lovemeter2)                    
                    elif lang == "en":
                        pyperclip.copy(" A perfect couple > " + lovemeter1 + ' and ' + lovemeter2)                 
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.paar', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " wäre ein super paar mir " + lovemeter2)
                    elif lang == "en":
                        res_str = str.replace('!couple', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " whould be a perfect couple with " + lovemeter2)                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                    
            elif whatmsg.startswith(".stundenplan") or whatmsg.startswith(".st") or whatmsg.startswith(".sp") or whatmsg.startswith(".timetable") or whatmsg.startswith(".tt"):
                def send_tt():
                    path = '/home/pi/timetable/' + day_individual + '.txt' # define the path of the timetable-file
                    print("Path: " + path) # print the path to terminal
                    timetablecontent = open(path, 'r').read() # open file
                    pyperclip.copy(timetablecontent) # copy file to clipboard
                    sleep(.8)
                    pt.keyDown("ctrl") # paste
                    sleep(.08) # paste
                    pt.press("v") # paste
                    sleep(.08) # paste
                    pt.keyUp("ctrl") # paste
                    sleep(.2)
                    pyautogui.press("enter") # send the message
                    pyperclip.copy("") # empty the clipboard
                
                if whatmsg.endswith("mo") or whatmsg.endswith("montag") or whatmsg.endswith("Montag") or whatmsg.endswith("monday"):
                    day_individual = "monday"
                    send_tt()
                elif whatmsg.endswith("di") or whatmsg.endswith("dienstag") or whatmsg.endswith("Dienstag") or whatmsg.endswith("tuesday"):
                    day_individual = "tuesday"
                    send_tt()
                elif whatmsg.endswith("mi") or whatmsg.endswith("mittwoch") or whatmsg.endswith("Mittwoch") or whatmsg.endswith("wednesday"):
                    day_individual = "wednesday"
                    send_tt()
                elif whatmsg.endswith("do") or whatmsg.endswith("donnerstag") or whatmsg.endswith("Donnerstag") or whatmsg.endswith("thursday"):
                    day_individual = "thursday"
                    send_tt()
                elif whatmsg.endswith("fr") or whatmsg.endswith("freitag") or whatmsg.endswith("Freitag") or whatmsg.endswith("friday"):
                    day_individual = "friday"
                    send_tt()
                elif whatmsg.endswith("sa") or whatmsg.endswith("samstag") or whatmsg.endswith("Samstag") or whatmsg.endswith("saturday") or whatmsg.endswith("so") or whatmsg.endswith("sonntag") or whatmsg.endswith("Sonntag") or whatmsg.endswith("sunday") or whatmsg.endswith("wo"):
                    day_individual = "weekend"
                    send_tt()
                else:
                    automatic = "no"
                    timetable()
                    
            elif whatmsg.startswith(".cool") or whatmsg.startswith("!cool"): # if messgae starts with cool
                sleep(.1)
                if lang == "de":
                    cool = random.choice([" Nah, nich so cool nur 0 bis 10 Prozent!", " Nicht wirklich. Gerade mal 10 bis 20 Prozent!", " Ca. 20 bis 30 Prozent... koennte besser sein...", " Eig. relativ okay, 40 bis 50 Prozent", " Recht nice du liegst Zwischen 50 und 60 Prozent", " Ganz cool, 60 bis 70 Prozent.", " Ich will mit dir befreundet sein! Zu 70 bis 80 Prozent cool!", " Super duper über mega cool! 80 bis 90 Prozent!", " Ich will dich heiraten! 90 bis 99 Prozent!", " Du bist ein Gott. Du hast naehmlich 100 Prozent!"]) # choose a random answer (in german, obviously)               
                elif lang == "en":
                    cool = random.choice([" No, not so cool. Only 0 up to 10 percent!", " Not really. Only 10 up to 20 percent!", " Between 20 and 30 percent... could be better...", " Actually not that bad, 40 up to 50 percent", " You are okay, you are between 50 and 60 percent!", " Very nice, 60 up to 70 Prozent.", " I want to be friends with you! You are to 70 up to 80 percent cool!", " Super mega cool! 80 up to 90 percent!", " I want to marry you! 90 up to 99 percent!", " You are a god. You have the 100 percent!"]) # choose a random answer (in english)                   
                else:
                    print("No correct language found, ignoring command...")
                if whatmsg == ".cool" or whatmsg == "!cool": # if it exactly equals to ".cool" move on with the code down here
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(cool) # write the random answer (defined above)
                    paste()
                    sleep(.2)
                    pyautogui.keyDown("shift") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    keyboard.press(":") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    pyautogui.keyUp("shift") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    pyautogui.typewrite("sunglasses") # add "sunglasses"-emoji
                    sleep(.4) # add "sunglasses"-emoji
                    pyautogui.press("enter") # add "sunglasses"-emoji
                    sleep(.7)
                    pyautogui.press("enter")
                elif whatmsg == ".cool Simon" or whatmsg == ".cool simon" or whatmsg == "!cool Simon" or whatmsg == "!cool simon": # else if the message ".cool" equals to ".cool Simon" move on with this code down here
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" Simon cant be cool, he is fuckin homophobic!") # say that simon is homophobic (that is actually true)
                    send()
                else: # else write the message how cool somebody is with the name given in the message (if there is no name it will use the first method at this command)
                    str = whatmsg
                    print ("Original string: " + str)  # print the original string to the console
                    if lang == "de":
                        res_str = str.replace('.cool', '')  # remove the ".cool" in the string, so there will only stay the given name in it
                        print ("The string after removal of character: " + res_str) # print the result string (the name)
                        sleep(.1)
                        pyperclip.copy(" Ergebnis von" + res_str + " :" + cool) # type the result                  
                    elif lang == "en":
                        res_str = str.replace('!cool', '')  # remove the ".cool" in the string, so there will only stay the given name in it
                        print ("The string after removal of character: " + res_str) # print the result string (the name)
                        sleep(.1)
                        pyperclip.copy(" Result of" + res_str + " :" + cool) # type the result           
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    sleep(.2)
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    pt.press("space")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("sunglasses")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                
            elif whatmsg.startswith(".witz") or whatmsg == "!joke":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" Ich fuehle mich so haesslich, so fett. Ich brauche ein Kompliment. > Du hast eine gute Beobachtungsgabe.")
                    elif spruch == "joke2":
                        pyperclip.copy(" Der Gefaengnisdirektor: Was wird nur Ihr armer Vater dazu sagen, dass sie schon wieder hier sind? > Fragen Sie ihn doch selbst. Er sitzt nur drei Zellen weiter!")
                    elif spruch == "joke3":
                        pyperclip.copy(" Warum ist ein Iglu rund? > Damit die Huskys nicht in die Ecken scheißen.")
                    elif spruch == "joke4":
                        pyperclip.copy(" Polizeikontrolle! Alkohol, Drogen? > Verkaufen Sie auch Pommes?")
                    elif spruch == "joke5":
                        pyperclip.copy(" Alle Kinder sitzen auf der Walze außer Gunther der liegt drunter.")
                    elif spruch == "joke6":
                        pyperclip.copy(" Alle Kinder sitzen ums Lagerfeuer außer Brigitte die sitzt in der Mitte.")
                    elif spruch == "joke7":
                        pyperclip.copy(" Alle kinder schlafen tief und munter, außer Gunther, der holt sich einen runter.")
                    elif spruch == "joke8":
                        pyperclip.copy(" Alle rennen aus dem brennenden Kino, nur nicht Abdul, der klemmt im Klappstuhl.")
                    elif spruch == "joke9":
                        pyperclip.copy(" Alle Kinder laufen über den Friedhof außer Hagen der wird begraben.")
                    elif spruch == "joke10":
                        pyperclip.copy(" Alle Kinder blieben vor der Klippe stehen außer Peter der ging noch nen Meter.")
                    elif spruch == "joke11":
                        pyperclip.copy(" Alle Kinder haben Haare außer Thorsten der hat Borsten.")
                elif lang == "en":
                    pyperclip.copy(" Jokes are not available in english jet!")              
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".schwarzer-humor" or whatmsg == ".sh" or whatmsg == ".black-humor" or whatmsg == "!black-humor" or whatmsg == "!bh" or whatmsg == "!b-h":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11", "joke12", "joke13"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Schwarzer Humor ist Wasser fuer meine Seele. > Aber nicht fuer Afrika.") # copy the joke to clipboard
                    elif spruch == "joke2":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Wie nennt man es, wenn sich zwei obdachlose mit steinen abwerfen? > Kissenschlacht!")
                    elif spruch == "joke3":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was sagt ein einarmiger, der Karten mischen soll? > Mischen Impossible")
                    elif spruch == "joke4":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was macht ein Rollstuhlfahrer, wenn er sauer ist? > Am Rad drehen.")
                    elif spruch == "joke6":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was hat ein Mann ohne Beine? > Eier aus Bodenhaltung")
                    elif spruch == "joke7":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Auf dem Mars wurde Wasser gefunden. > Mars 1 - Afrika 0")
                    elif spruch == "joke8":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wie bekommt man am besten Kaugummi aus den Haaren? > Mit Krebs.")
                    elif spruch == "joke9":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wieso kaufen sich Waisenkinder ein IPhone 11? > Weil es beim IPhone 11 keinen Home-Button gibt.")
                    elif spruch == "joke10":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Was ist der Unterschied zwischen einer Pizza und einem Emo? > Die Pizza schneidet sich nicht selbst.")
                    elif spruch == "joke11":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wieso gibt es in Afrika keine Medikamente? > Weil man sie nach dem Essen einnehmen muss.")
                    elif spruch == "joke12":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Was steht auf dem Grabstein einer Putzfrau? > Sie kehrt nie wieder.")
                    elif spruch == "joke13":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Warum schlagen Frauen immer mit links zu? > Weil sie keine Rechte haben.")
                elif lang == "en":
                    pyperclip.copy(" Black humor not available in english jet!")              
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".randomname") or whatmsg.startswith(".rn") or whatmsg.startswith("!randomname") or whatmsg.startswith("!rn"):
                name1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name3 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "Julian S.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name4 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name5 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "Julian S.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name6 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name7 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name8 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name9 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if lang == "de":
                    name_lang1 = "Name"
                    name_lang = "Namen"
                elif lang == "en":
                    name_lang1 = "name"
                    name_lang = "names"                   
                else:
                    print("No correct language found, ignoring command...")
                if whatmsg == ".randomname" or whatmsg == ".rn" or whatmsg == "!randomname" or whatmsg == "!rn":
                    namelist = " 0 Arguments given. Expected 1. : Bitte gib eine Zahl an!"
                elif whatmsg.endswith("1"):
                    namelist = " 1 " + name_lang1 + " : " + name1
                elif whatmsg.endswith("2"):
                    namelist = " 2 " + name_lang + " : " + name1  + ", " + name2
                elif whatmsg.endswith("3"):
                    namelist = " 3 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3
                elif whatmsg.endswith("4"):
                    namelist = " 4 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4
                elif whatmsg.endswith("5"):
                    namelist = " 5 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5
                elif whatmsg.endswith("6"):
                    namelist = " 6 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6
                elif whatmsg.endswith("7"):
                    namelist = " 7 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6 + ", " + name7
                elif whatmsg.endswith("8"):
                    namelist = " 8 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6  + ", " + name7  + ", " + name8
                elif whatmsg.endswith("9"):
                    namelist = " 9 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6  + ", " + name7  + ", " + name8  + ", " + name9
                print("Revieved message:", whatmsg)
                sleep(.3)
                pyperclip.copy(namelist)
                send() 
            
            elif whatmsg.startswith(".ship") or whatmsg.startswith("!ship"):
                lovemeter1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Sabrina", "Simon", "Sunny", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                lovemeter2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Sabrina", "Simon", "Sunny", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if whatmsg == ".ship" or whatmsg == "!ship":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Ich shippe " + lovemeter1 + ' mit ' + lovemeter2)                  
                    elif lang == "en":
                        pyperclip.copy(" I ship " + lovemeter1 + ' with ' + lovemeter2)                        
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.ship', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " shippe ich mit " + lovemeter2)                   
                    elif lang == "en":
                        res_str = str.replace('!ship', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(" I ship" + res_str + " with " + lovemeter2)                    
                    else:
                        print("No correct language found, ignoring command...")
                    send()

                def lovemeter_persons():
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" " + lovemeter_name + " passt super zu: " + lovemeter1)
                    send()

            else:
                print("No new messages!")
    def class1():
        pt.moveTo(group1)
        sleep(0.5)
        pt.click()
        sleep(.8)
        bot_main()
    def class2():
        pt.moveTo(group2) 
        sleep(0.5)
        pt.click()
        sleep(.8)
        bot_main()
    class1()
    class2()
#!/usr/bin/python3

# PLEASE READ EVERY LINE WHERE I COMMENTED "TODO"! YOU CAN SEARCH IT IN THE TEXT BY USING THE SEARCH TOOL OF YOUR TEXT EDITOR OR IDE!

# INFO
# This Script was made by "DasPrombelBread" (Lane)!
# This program is standing under the MIT license,
# you can copy it and do whatever you want with it.

# Last updated: November 16, 2021

edition = "laneBOT aka Guenni aka Mika : WHATSAPP EDITION" # define which edition of the program it is
version = "5.3.08" # define the version
author = "Lane" # define the name of the creator

conf_file = "/home/pi/timetable/conf.txt" # set the location for config file

config = open(conf_file, 'r').read()
print(config)

if config.__contains__("location=home"):
    location = "home"
elif config.__contains__("holidays=grandpa"):
    location = "grandpa"
else:
    print("LOCATION: Could not find correct arguments in " + conf_file + " using `home` configuration...")
    sleep(5)

import pyautogui as pt # must be manually installed
import pyperclip # must be manually installed (on most systems)
import sys # is installed by default
import os # also installed by default
import subprocess # installed by default
import random # import random. installed by default
from time import sleep # time is also installed by default
from datetime import date, datetime # installed by default
import subprocess # installed by default
import pyautogui # must be manually installed on most systems
from pynput.keyboard import Key, Controller # must be manually installed
keyboard = Controller() # define keyboard as Controller(). this is used by pynput

pyperclip.copy("") # empty the clipboard
automatic = "no"
lang = "de" # set language to german by default

if location == "home":
    print("at home")
    chat_beginning = 775, 960
    move_rel = 820, 1
    logs = 450, 300 
    group1 = 450, 230
    group2 = 450, 370
    
elif location == "grandpa":
    print("at grandpa's")
    chat_beginning = 505, 668
    move_rel = 780, 1
    logs = 300, 280
    group1 = 300, 200
    group2 = 300, 363
    
else:
    print("could not find location, using home")
    chat_beginning = 775, 960
    move_rel = 820, 2
    logs = 450, 300
    group1 = 450, 230
    group2 = 450, 370 

def start_reloader():
    subprocess.Popen("bot_reloader")
start_reloader()

def start_whatsapp():
    subprocess.Popen("whatsapp")
    sleep(40)
    
    # write logs
    pt.moveTo(logs)
    sleep(.4)
    pt.click()
    sleep(2)
    pyperclip.copy("WhatsApp has been Started!")
    sleep(.2)
    pt.keyDown("ctrl") # paste
    sleep(.08) # paste
    pt.press("v") # paste
    sleep(.08) # paste
    pt.keyUp("ctrl") # paste
    sleep(.14)
    pyautogui.press("enter") # send the message
    sleep(.2)
    pt.press("enter")
start_whatsapp()

while True: # an basic while loop, repeat the code written down here 
    def bot_main():
        # pt.press("pagedown") # press "pagedown"-key to go to the end of the chat
        time_now = datetime.now() 
        date_now = datetime.now().strftime("%w")
        current_time = time_now.strftime("%H:%M:%S") # set the time format
        
        def restart_wa():
            sleep(0.2)
            pt.keyDown("alt")
            sleep(0.2)
            pt.press("f4")
            sleep(0.2)
            pt.keyUp("alt")
            sleep(0.4)
            pyautogui.press("enter")
            sleep(0.5)
            sys.stdout.flush()
            os.execv(sys.argv[0], sys.argv)
            
        def timetable():
            if date_now == "1": # date_now says which day of the week it is. 1 = monday, 2 = tuesday, ...
                day = "monday"
            elif date_now == "2":
                day = "tuesday"
            elif date_now == "3":
                day = "wednesday"
            elif date_now == "4":
                day = "thursday"
            elif date_now == "5":
                day = "friday"
            else:
                day = "weekend"
                print("Weekend!")
                
            if day == "weekend":
                print("Lesgo! (weekend)")
                path = '/home/pi/timetable/weekend.txt' # define the path of the timetable-file
                print("Path: " + path) # print the path to terminal
                timetablecontent = open(path, 'r').read() # open file
                pyperclip.copy(timetablecontent) # copy file to clipboard
                sleep(.5)
                if automatic == "yes":
                    print("starting automatically")
                    pt.moveTo(group1)
                    sleep(.3)
                    pt.click()
                    sleep(1.6)
                else:
                    print("starting by command")
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.2)
                pyautogui.press("enter") # send the message
                pyperclip.copy("") # empty the clipboard
            else:
                print("Lesgo!")
                path = '/home/pi/timetable/' + day + '.txt' # define the path of the timetable-file
                print("Path: " + path) # print the path to terminal
                timetablecontent = open(path, 'r').read() # open file
                pyperclip.copy(timetablecontent) # copy file to clipboard
                sleep(.5)
                if automatic == "yes":
                    print("starting automatically")
                    pt.moveTo(group1)
                    sleep(.3)
                    pt.click()
                    sleep(1.6)
                else:
                    print("starting by command")
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.2)
                pyautogui.press("enter") # send the message
                pyperclip.copy("") # empty the clipboard
        
        if current_time.startswith("06:15:1"): # if current time starts with 06:30:1... am, start "timetable" function, else use the bot
            if config.__contains__("holidays=true"):
                random_count = random.randint(1,6)
                if random_count == 4:
                    print("Timetable!")
                    sleep(10)
                    automatic = "yes"
                    timetable()
                    automatic = "no"
                else:
                    print("Ferien!")
            elif config.__contains__("holidays=false"):
                print("Timetable!")
                sleep(10)
                automatic = "yes"
                timetable()
                automatic = "no"
            else:
                print("TIMETABLE: Could not find correct arguments in " + conf_file + " skipping posting timetable...")
                sleep(10)
                
        elif current_time.startswith("00:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("05:30:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("09:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("11:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("14:30:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("17:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
        elif current_time.startswith("20:00:0"):
            print("Restarting...")
            sleep(10)
            restart_wa()
            
        else:
            print("No timetable!")
            def copy():
                pt.moveTo(chat_beginning)
                sleep(0.6)
                pt.mouseDown() # press down left mouse button
                sleep(0.3)
                pt.moveRel(move_rel, duration=.22)
                sleep(0.2)
                pt.mouseUp() # stop pressing the left mouse button
                sleep(0.2)
                pt.keyDown("ctrl") # copy the message
                sleep(0.15) # copy the message
                pt.press("c") # copy the message
                sleep(0.15) # copy the message
                pt.keyUp("ctrl") # copy the message
                sleep(0.3)
                pt.click() # click into the void to remove the selection of the last message
            copy()

            whatmsg = pyperclip.paste() # define "whatmsg" with pyperclip.paste (the content in the clipboard)
            if whatmsg.startswith("."):
                lang = "de"
                print("German command input")
            elif whatmsg.startswith("!"):
                lang = "en"
                print("English command input")
            else:
                lang = "de" # set to default again
                print("Last message isn't a command, so no language could be set")
            
            def paste(): # paste and the message
                sleep(.17)
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.14)
                
            def bot_message(): # define the bot_message function
                sleep(.1)
                pt.press("a") # press "a" to automatically get into the text field
                sleep(.1)
                pt.keyDown("backspace") # delete the "a" and all other content that may be in the text field
                sleep(.1)
                pt.keyUp("backspace")
                sleep(.1)
                pt.keyDown("backspace")
                sleep(.1)
                pt.keyUp("backspace")
                sleep(.2)
                pyautogui.keyDown("shift") # put the "shift" key down
                sleep(.1)
                keyboard.press(":") # press the ":" key (only works when shift is down)
                sleep(.1)
                pyautogui.keyUp("shift") # put the "shift" key up
                sleep(.1)
                pyautogui.typewrite("robot") # write "robot", to call the "robot"-emoji
                sleep(.1)
                pyautogui.press("enter") # press enter to enter the "robot"-emoji
                sleep(.1)
                pyautogui.keyDown("shift") # make a ":" again
                keyboard.press(":")
                pyautogui.keyUp("shift")
            
            def send(): # paste and send the message
                bot_message()
                sleep(.17)
                pt.keyDown("ctrl") # paste
                sleep(.08) # paste
                pt.press("v") # paste
                sleep(.08) # paste
                pt.keyUp("ctrl") # paste
                sleep(.14)
                pyautogui.press("enter") # send the message
            
            if whatmsg == ".help" or whatmsg == ".hilfe" or whatmsg == "!help" : # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement
                print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                if lang == "de":
                    pyperclip.copy(" Hilfe: http://www.lane-bot.tk/ oder https://is.gd/guenni \n \nInfo: " + edition + ". Version: " + version + ". Made by " + author) # write the info-message (with an interval of 0.1 seconds between every key)
                elif lang == "en":
                    pyperclip.copy(" Help: http://www.lane-bot.tk/ or https://is.gd/guenni \n \nInfo: " + edition + ". Version: " + version + ". Made by " + author) # write the info-message (with an interval of 0.1 seconds between every key)
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".about" or whatmsg == "!about": # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement
                print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                if lang == "de":
                    pyperclip.copy(" Der laneBOT ist aktuell ein WhatsApp- und Discord-Bot, welcher hauptsächlich dazu gedacht ist, diese Klassengruppe Informieren und Unterhalten zu können. Die Discord-Version kann aber auch auf jedem beliebigen anderen Server hinzugefügt werden (Invite-Link auf meiner Webseite). Die WhatsApp-Version richtet sich fast nur auf den Einsatz in meiner Schulklasse. \n\nEin kleiner Nachteil an dem WhatsApp-Bot ist, dass dieser denselben Account benutzt wie ich (Lane), allerdings sind die Nachrichten des Bots erkennbar durch einen Roboter-Emoji am Anfang jeder Nachricht. Weitere Informationen gibt es unter http://www.lane-bot.tk oder https://is.gd/guenni")                    
                elif lang == "en":
                    pyperclip.copy(" Currently, the laneBOT a WhatsApp- and Discord-bot, which is mainly intendet to inform and entertain this group. The Discord-version can also be added to any other server (invite-link on my webseite). The WhatsApp-version is directed almost only for the use in my school class. \n\nA small disatvantage of the WhatsApp-bot is, that it uses the same account as I (Lane), but the messages which come from the bot are recognizable through a robot-emoji on the start of each message. More informations at http://www.lane-bot.tk or https://is.gd/guenni")                    
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".info" or whatmsg == "!info":
                print("Revieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Info : " + edition + ". Version : " + version + ". Made by " + author + " Web: http://www.lane-bot.tk/ oder https://is.gd/guenni")                    
                elif lang == "en":
                    pyperclip.copy(" Info : " + edition + ". Version : " + version + ". Made by " + author + " Web: http://www.lane-bot.tk/ oder https://is.gd/guenni")                    
                else:
                    print("No correct language found, ignoring command...")
                send() 
               
            elif whatmsg.startswith(".oracle") or whatmsg.startswith("!oracle"): # if whatsapp message starts with ".oracle" open this function
                if whatmsg.__contains__("wann") or whatmsg.__contains__("when"): # if the message contains "wann" (german word for "when") do this, else move to next "elif"-statement
                    print("Revieved message:", whatmsg) # print the recieved message to the console (terminal)
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Immer", "Nie", "Gestern", "Vorgestern", "Übermorgen", "Morgen", "Wird nicht vorkommen", "Ist schon passiert"]) # choose a random word as answer
                        pyperclip.copy(' Deine antwort lautet > ' + answer) # type the answer               
                    elif lang == "en":
                        answer = random.choice(["ever", "never", "yesterday", "the day before yesterday", "the day after tomorrow", "tomorrow", "will not happen", "already happened"]) # choose a random word as answer
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer               
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                elif whatmsg.startswith(".oracle wer") or whatmsg.startswith("!oracle who"): # if the message starts with ".oracle wer" ("wer" = german word for "who") do this, else move to "else"-statement
                    print("Recieved message:", whatmsg) # print the revieved messahe to the console (terminal)
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"]) # choose a random name from my school class
                        pyperclip.copy(' Deine antwort lautet > ' + answer) # type the answer                  
                    elif lang == "en":
                        answer = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"]) # choose a random name from my school class
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("Revieved message:", whatmsg) # if the message ditn't include "wann" or "wer", type one of these random answers 
                    sleep(.3)
                    if lang == "de":
                        answer = random.choice(["Ja", "Nein", "Vielleicht", "Immer", "Nie", "Gestern", "Vorgestern", "Uebermorgen", "Wird nicht vorkommen", "Ist schon passiert", "Ja", "Nein", "Ich habe dich leider nicht verstanden.", "Ja", "Nein"]) # choose a random answer
                        pyperclip.copy(' Deine Antwort lautet > ' + answer) # type the answer              
                    elif lang == "en":
                        answer = random.choice(["yes", "no", "maybe", "ever", "never", "yesterday", "the day before yesterday", "the day after tomorrow", "tomorrow", "will not happen", "has already happened", "yes", "no", "sorry, I didn't understand you", "yes", "no"]) # choose a random answer
                        pyperclip.copy(' Your answer is > ' + answer) # type the answer              
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                    
            elif whatmsg == ".spruch" or whatmsg == "!saying":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11", "joke12", "joke13", "joke14", "joke15", "joke16", "joke17", "joke18", "joke19", "joke20", "joke21", "joke22", "joke23", "joke24", "joke25", "joke26", "joke27", "joke28", "joke29", "joke30"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" *Anmachspruch*: 'If she leaves for another, there always her mother'.") # copy the joke to clipboard
                    elif spruch == "joke2":
                        pyperclip.copy(" *Anmachspruch*: 'Ich bin neidisch auf dein Herz, weil es in dir pulsiert und ich nicht'")
                    elif spruch == "joke3":
                        pyperclip.copy(" *Anmachspruch*: Ich glaube deine Beine streiten sich, soll ich dazwischen gehen?")
                    elif spruch == "joke4":
                        pyperclip.copy(" *Anmachspruch*: Na Schnitte, schon belegt?")
                    elif spruch == "joke5":
                        pyperclip.copy(" *Anmachspruch*: Ey Praline schon ne Füllung?")
                    elif spruch == "joke6":
                        pyperclip.copy(" *Anmachspruch*: Ich bin neu in der Stadt kannst du mir den Weg zu dir nach hause zeigen?")
                    elif spruch == "joke7":
                        pyperclip.copy(" *Anmachspruch*: Sind deine Eltern Architekten, oder wieso bist du so gut gebaut?")
                    elif spruch == "joke8":
                        pyperclip.copy(" *Anmachspruch*: Wenn du eine Frucht wärst, wärst du ein Pfirsich weil du so süß bist.")
                    elif spruch == "joke9":
                        pyperclip.copy(" *Anmachspruch*: Bist du Gärtnerin? Weil immer wenn ich dich sehe wächst meine Gurke.")
                    elif spruch == "joke10":
                        pyperclip.copy(" *Anmachspruch:* Deine Lippen sehen sehr alleine aus maybe sollten die sich mal treffen?")
                    elif spruch == "joke11":
                        pyperclip.copy(" *Anmachspruch:* Deine Stimme ist echt geil aber noch geiler wäre es, wenn sie meinen namen stöhnen würde")
                    elif spruch == "joke12":
                        pyperclip.copy(" *Anmachspruch:* Lass es so machen: du gibst mir deinen Pulli, aber du musst ihn mir später auch wieder ausziehen")
                    elif spruch == "joke13":
                        pyperclip.copy(" *Anmachspruch:* Du siehst echt traurig aus... Aber mach dir keine Sorgen, meine Schultern sind immer frei für deine Beine")
                    elif spruch == "joke14":
                        pyperclip.copy(" *Anmachspruch:* Ich kenn mich zwar nicht so gut mit Gewürzen aus, aber du bist scharf")
                    elif spruch == "joke15":
                        pyperclip.copy(" *Anmachspruch:* Du magst schlafen, ich mag schlafen. Vielleicht sollten wir mal zusammen schlafen?")
                    elif spruch == "joke16":
                        pyperclip.copy(" *Anmachspruch:* Ich hab irgendwie mein Kissen verloren, darf ich zwischen deinen Beinen liegen?")
                    elif spruch == "joke17":
                        pyperclip.copy(" *Anmachspruch:* Ich heiße zwar nicht Manuel aber vielleicht bin ich ja dein Neuer-")
                    elif spruch == "joke18":
                        pyperclip.copy(" *Anmachspruch:* Ist irgendwo ein Atomkraftwerk explodiert oder warum hast du so eine krasse Ausstrahlung?")
                    elif spruch == "joke19":
                        pyperclip.copy(" *Anmachspruch:* Gold schmilzt bei 1064 Grad, Titan schmilzt bei 1668 Grad und ich schmelze bei deinem Anblick.")
                    elif spruch == "joke20":
                        pyperclip.copy(" *Anmachspruch:* Ich kann nicht sagen ob du schön bist. Wahre Schönheit kommt von Innen und in dir war ich noch nicht.")
                    elif spruch == "joke21":
                        pyperclip.copy(" *Anmachspruch:* Ich hab Spotify verklagt, weil du nicht unter den heißesten singles bist.")
                    elif spruch == "joke22":
                        pyperclip.copy(" *Anmachspruch:* Ich will dich jetzt nicht dumm anmachen, aber ich hätte nichts dagegen wenn du es machst.")
                    elif spruch == "joke23":
                        pyperclip.copy(" *Anmachspruch:* Wenn Corona dich noch nicht flachgelegt hat, kann ich es auch gerne tun.")
                    elif spruch == "joke24":
                        pyperclip.copy(" *Anmachspruch:* Hast du einen Namen oder kann ich dich direkt `Meins` nennen?")
                    elif spruch == "joke25":
                        pyperclip.copy(" *Anmachspruch:* Auch wenn ich in keiner Gewürzfabrik arbeite, erkenne ich, dass du scharf bist.")
                    elif spruch == "joke26":
                        pyperclip.copy(" *Anmachspruch:* Ich bin zwar kein Magier aber ich zerleg dich trotzdem in der Kiste")
                    elif spruch == "joke27":
                        pyperclip.copy(" *Anmachspruch:* Ich hab meine Decke verloren- darf ich mich heute Nacht an dich kuscheln?")
                    elif spruch == "joke28":
                        pyperclip.copy(" *Anmachspruch:* Du bist so heiß da braucht man sich nicht wundern warum die Gletscher schmelzen")
                    elif spruch == "joke29":
                        pyperclip.copy(" *Anmachspruch:* Wollen wir zusammen heute Nacht die Sterne anschauen? - Ich hol dir dann auch einen runter")
                    elif spruch == "joke30":
                        pyperclip.copy(" *Anmachspruch:* Wir sind wie eine Achterbahn, je schneller du wirst desto lauter werd ich")
                elif lang == "en":
                    pyperclip.copy(" Sayings are not available in english.")
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".cat" or whatmsg == "!cat":
                print("Recieved message:", whatmsg)
                
                cat1 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse1.jpg"
                cat2 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse2.jpg"
                cat3 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse3.jpg"
                cat4 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse4.jpg"
                cat5 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse5.jpg"
                cat6 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse6.jpg"
                cat7 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse7.jpg"
                cat8 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse8.jpg"
                cat9 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse9.jpg"
                cat10 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse10.jpg"
                cat11 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse11.jpg"
                cat12 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse12.jpg"
                cat13 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse13.jpg"
                cat14 = "https://fh-site.github.io/else/laneBOT/images/cats/kadse14.jpg"
                
                cat_list = random.choice([cat1, cat2, cat3, cat4, cat5, cat6, cat7, cat8, cat9, cat10, cat11, cat12, cat13, cat14])
            
                
                if lang == "de":
                    pyperclip.copy(" Kadse: " + cat_list)                   
                elif lang == "en":
                    pyperclip.copy(" Cet: " + cat_list)                   
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".dog" or whatmsg == "!dog":
                print("Recieved message:", whatmsg)
                
                dog1 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau1.jpg"
                dog2 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau2.jpg"
                dog3 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau3.jpg"
                dog4 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau4.jpg"
                dog5 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau5.jpg"
                dog6 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau6.jpg"
                dog7 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau7.jpg"
                dog8 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau8.jpg"
                dog9 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau9.jpg"
                dog10 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau10.jpg"
                dog11 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau11.jpg"
                dog12 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau12.jpg"
                dog13 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau13.jpg"
                dog14 = "https://fh-site.github.io/else/laneBOT/images/dogs/wuffwau14.jpg"
                
                dog_list = random.choice([dog1, dog2, dog3, dog4, dog5, dog6, dog7, dog8, dog9, dog10, dog11, dog12, dog13, dog14])
            
                if lang == "de":
                    pyperclip.copy(" Hühn(d)chen: " + dog_list)                   
                elif lang == "en":
                    pyperclip.copy(" Doggo: " + dog_list)                   
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".wahrheit-oder-pflicht") or whatmsg.startswith(".truth-or-dare") or whatmsg.startswith(".wop") or whatmsg.startswith(".w-o-p") or whatmsg.startswith(".tod") or whatmsg.startswith(".t-o-d") or whatmsg.startswith("!truth-or-dare") or whatmsg.startswith("!wop") or whatmsg.startswith("!w-o-p") or whatmsg.startswith("!tod") or whatmsg.startswith("!t-o-d"):
                print("Recieved message:", whatmsg)
                random_name = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if lang == "de":
                    truth1 = "*Wahrheit*: Was war als Kind deine Lieblingsserie?"
                    truth2 = "*Wahrheit*: Hast du jemals erfolgreich jemanden verführt?"
                    truth3 = "*Wahrheit*: Falls dein Partner 30kg zu nehmen würde, würdest du ihn/sie verlassen?"
                    truth4 = "*Wahrheit*: Würdest du mit jemandem für Geld Sex haben? Und wenn ja, wie viel würdest du verlangen?"
                    truth5 = "*Wahrheit*: Wie viel geld würdest du verlangen, um nackt für eine Kunst-Klasse zu posen?"
                    truth6 = "*Wahrheit*: Beschreibe detailliert welche Unterhose du gerade trägst"
                    truth7 = "*Wahrheit*: Glaubst du, du kannst mit " + random_name + " vier mal nachts Sex haben?"
                    truth8 = "*Wahrheit*: Würdest du in einem Porno mit machen wenn niemand dein Gesicht erkennen kann?"
                    truth9 = "*Wahrheit*: Hast du schon mal die ganze Nacht lange gefeiert und musstest am nächsten Tag in die Schule?"
                    truth10 = "*Wahrheit*: Würdest du mit " + random_name + " aus gehen?"
                    truth11 = "*Wahrheit*: Hast du dich schon einmal geprügelt? Und wenn ja, hast du gewonnen?"
                    truth12 = "*Wahrheit*: Was ist die gefährlichste Sache, die du je getan hast?"
                    truth13 = "*Wahrheit*: Falls du in einer Woche ein Kind bekommen würdest, wie würdest du es nennen?"
                    truth14 = "*Wahrheit*: Was hasst du am meisten an deiner am besten befreundeten Person?"
                    truth15 = "*Wahrheit*: Was hasst du am meisten an dir selbst?"
                    truth16 = "*Wahrheit*: Was hasst du am meisten an " + random_name + "?"
                    truth17 = "*Wahrheit*: Würdest du " + random_name + " für 100 Euro küssen?"
                    truth18 = "*Wahrheit*: Würdest du für eine Nacht lieber eine Person haben, die hot und dumm oder nicht-so-hot und schlau ist? Und was würdest du mit der Person machen?"
                    truth19 = "*Wahrheit*: Was ist dein dunkelstes Geheimnis?"
                    truth20 = "*Wahrheit*: Hast du schon einmal Hentai gesehen oder erotische Geschichten gelesen?"
                    truth21 = "*Wahrheit:* Wo rasierst du dich überall?"
                    truth22 = "*Wahrheit:* Schaust du vor dem Spülen in die Kloschüssel?"
                    truth23 = "*Wahrheit:* Wen hast du zuletzt geküsst?"
                    truth24 = "*Wahrheit:* Hast du schon einmal jemanden gemobbt?"
                    truth25 = "*Wahrheit:* Was war die letzte Lüge, die du jemandem erzählt hast?"
                    truth26 = "*Wahrheit:* Pinkelst du in der Dusche?"
                    truth27 = "*Wahrheit:* Wen aus der Klasse würdest du am ehesten küssen?"
                    truth28 = "*Wahrheit:* Was und mit wem war dein schlechtestes Date?"
                    truth29 = "*Wahrheit:* Was magst du am liebsten an dir?"
                    truth30 = "*Wahrheit:* Was war dein schlimmster Korb?"
                    truth31 = "*Wahrheit:* Was war das schlimmste, das du jemals jemandem angetan hast?"
                    truth32 = "*Wahrheit:* Was ist die schmutzigste Nachricht, die du je verschickt hast?"
                    truth33 = "*Wahrheit:* Was ist deine dunkelste Fantasie?"
                    truth34 = "*Wahrheit:* Schaust du Pornos?"
                    truth35 = "*Wahrheit:* Besitzt du ein Sexspielzeug?"
                    truth36 = "*Wahrheit:* Hattest du schonmal Sex-Fantasien mit jemandem aus unserer Klasse?"
                    truth37 = "*Wahrheit:* Vor was hast du am meisten Angst?"
                    truth38 = "*Wahrheit:* Welches Talent hättest du gerne?"
                    truth39 = "*Wahrheit:* Was isst du am liebsten?"
                    truth40 = "*Wahrheit:* Hast du schon einmal geraucht?"
                    truth41 = "*Wahrheit:* Was ist dein Lieblingsfilm?"
                    truth42 = "*Wahrheit:* Hast du schon einmal etwas gestohlen?"
                    truth43 = "*Wahrheit:* Wann hast du das letzte mal geweint?"
                    truth44 = "*Wahrheit:* Was ist dein Lieblings-Schulfach?"
                    truth45 = "*Wahrheit:* Welches Buch hast du als letztes gelesen?"
                    
                    dare1 = "*Pflicht:* Wickle die nächste Person zu dir in Toilettenpapier ein"
                    dare2 = "*Pflicht:* Versuche, eine eigene Nase abzulecken"
                    dare3 = "*Pflicht:* Küsse die nächste Person rechts von dir auf den Mund"
                    dare4 = "*Pflicht:* Du musst drei Minuten lange alles mit 'Ja' beantworten"
                    dare5 = "*Pflicht:* Gehe zu" + random_name + " und gib der Person eine Ohrfeige"
                    dare6 = "*Pflicht:* Du wirst " + random_name + " von jetzt an so lange 'Schatz' nennen, bis die Person dir sagt dass du aufhören sollst."
                    dare7 = "*Pflicht:* Kratze dein linkes Ohr mit einem deiner Füße wie eine Katze."
                    dare8 = "*Pflicht:* Lege deine Hände für 2 Minuten auf den Kopf und bewege dich nicht."
                    dare9 = "*Pflicht:* Schreibe in den nächsten Chat unter dieser Gruppe 'es ist aus mit uns'"
                    dare10 = "*Pflicht:* Versuche deinen Ellenbogen abzulecken"
                    dare11 = "*Pflicht:* Hüpfe im Kreis um den nächsten Tisch, der genug Platz außenrum bietet."
                    dare12 = "*Pflicht:* Sei kreativ: male etwas lustiges auf den Unterarm von " + random_name + "!"
                    dare13 = "*Pflicht:* Setze für die nächsten 2 Wochen an deinem Handy einen Wecker auf 8 Uhr (morgens)"
                    dare14 = "*Pflicht:* Für die nächsten zwei Minuten musst du jeden satz mit '" + random.choice(["ich liebe dich", "Bratwurst"]) + "' beenden!"
                    dare15 = "*Pflicht:* Schreibe deiner Mutter, dass du eine Sechs in Mathe geschrieben hast."
                    dare16 = "*Pflicht:* "
                    dare17 = "*Pflicht:* "
                    
                    truth_list = random.choice([truth1, truth2, truth3, truth4, truth5, truth6, truth7, truth8, truth9, truth10, truth11, truth12, truth13, truth14, truth15, truth16, truth17, truth18, truth19, truth20, truth21, truth22, truth23, truth24, truth25, truth26, truth27, truth28, truth29, truth30, truth31, truth32, truth33, truth34, truth35, truth36, truth37, truth38, truth39, truth40, truth41, truth42, truth43, truth44, truth45])
                    dare_list = random.choice([dare1, dare2, dare3, dare4, dare5, dare6, dare7, dare8, dare9, dare10, dare11, dare12, dare13, dare14, dare15])
                    
                    if whatmsg.endswith(" truth") or whatmsg.endswith(" wahrheit") or whatmsg.endswith(" w"):
                        pyperclip.copy(" " + truth_list)
                        send()
                    elif whatmsg.endswith(" dare") or whatmsg.endswith(" pflicht") or whatmsg.endswith(" p"):
                        pyperclip.copy(" " + dare_list)
                        send()
                    elif whatmsg == ".truth-or-dare" or whatmsg == ".wahrheit-oder-pflicht" or whatmsg == ".w-o-p" or whatmsg == ".wop":
                        pyperclip.copy(" " + random.choice([truth_list, dare_list]))
                        send()
                    else:
                        pyperclip.copy(" truth-or-dare: *Unknown argument!*")
                        send()
                                  
                elif lang == "en":
                    pyperclip.copy(" Truth or dare is not available in english jet.")
                    send()                   
                else:
                    print("No correct language found, ignoring command...")
                            
            elif whatmsg == ".illegal" or whatmsg == "!illegal":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    illegal = random.choice(["Toete einen Menschen", "Kauf ne Waffe auf einem Darknet Markt", "Sag dass jemand aus der Klasse tiere fckt"])
                    pyperclip.copy(" Richtig illegal : " + illegal)
                elif lang == "en":
                    illegal = random.choice(["kill someone", "buy a weapon on a darknet market", "say that someone in the class is fcking animals"])
                    pyperclip.copy(" Very illegal : " + illegal)                  
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".restart_bot" or whatmsg == "!restart_bot":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Starte bot neu... (dieser Prozess kann bis zu zwei Minuten dauern)")                  
                elif lang == "en":
                    pyperclip.copy(" Restarting bot... (this process may last up to two minutes)")                    
                else:
                    print("No correct language found, ignoring command...")
                send()
                restart_wa()
                
            elif whatmsg == ".online" or whatmsg == "!online":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Offensichtlich online, oder?")                   
                elif lang == "en":
                    pyperclip.copy(" Obviously online, right?")             
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".restartbot" or whatmsg == "!restartbot":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Du darfst diesen Befehl nicht verwenden!")                    
                elif lang == "en":
                    pyperclip.copy(" You are not allowed to use this command!")             
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".würfel" or whatmsg == "!roll" or whatmsg == "!cube" or whatmsg == "!dice":
                print("Recieved message:", whatmsg)
                if lang == "de":
                    pyperclip.copy(" Ich Würfle...")
                    send()
                    sleep(1)
                    cube_res = random.choice([" Ergebnis: 1", " Ergebnis: 2", " Ergebnis: 3", " Ergebnis: 4", "Ergebnis: 5", " Ergebnis: 6"])
                    pyperclip.copy(cube_res)
                    pyperclip.copy(cube_res)                   
                elif lang == "en":
                    pyperclip.copy(" I roll...")
                    send()
                    sleep(1)
                    cube_res = random.choice([" Result: 1", " Result: 2", " Result: 3", " Result: 4", " Result: 5", " Result: 6"])
                    pyperclip.copy(cube_res)
                    pyperclip.copy(cube_res)                    
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".say") or whatmsg.startswith("!say"):
                print("Recieved message:", whatmsg)
                str = whatmsg
                print ("Original string: " + str) 
                if lang == "de":
                    res_str = str.replace('.say', '')                     
                elif lang == "en":
                    res_str = str.replace('!say', '')                  
                else:
                    print("No correct language found, ignoring command...")
                print ("The string after removal of character: " + res_str)
                sleep(.1)
                pyperclip.copy(res_str)
                send()
            
            elif whatmsg.startswith(".love") or whatmsg.startswith("!love"):
                str = whatmsg
                print ("Original string: " + str) 
                if lang == "de":
                    res_str = str.replace('.love', '')
                    lovemeter_res = random.choice([" Zwischen 0 und 20 Prozent... eher nich so", " Zwischen 20 und 30 Prozent. Das koennte noch was werden", " 30 bis 50 Prozent, nicht super aber schon recht gut!", " 50 bis 60 Prozent. Ein Date koennte helfen!", " 60 bis 80 Prozent!! Ab zum Date!", " 80 bis 99 Prozent! Bist du dir sicher, dass die Personen nicht schon zusammen sind?", " FUCKING 100 PROZENT! AB AUF DIE HOCHZEIT!"])
                elif lang == "en":
                    res_str = str.replace('!love', '')
                    lovemeter_res = random.choice([" Between 0 and 20 percent... not that good", " Between 20 and 30 percent. This could end up in something", " 30 up to 50 percent, not the best but already good!", " 50 up to 60 percent. A date may help!", " 60 up to 80 percent!! Go to your date!", " 80 up to 99 percent! Are you shure that those persons are not together already?", " FUCKING 100 PERCENT! LET'S GO TO THE WEDDING!"])
                else:
                    print("No correct language found, ignoring command...")
                print ("The string after removal of character: " + res_str)
                if whatmsg == ".love":
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(lovemeter_res)
                    send()
                else:
                    print("two")
                    sleep(.1)
                    if lang == "de":
                        pyperclip.copy(" Ergebnis von" + res_str + " :" + lovemeter_res)                    
                    elif lang == "en":
                        pyperclip.copy(" Result of" + res_str + " :" + lovemeter_res)                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()

                
            elif whatmsg.startswith(".queer") or whatmsg.startswith("!queer"):
                print("Revieved message:", whatmsg)
                sleep(.2)
                queer = random.randint(1,100)
                #queer = random.choice(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100!!"])
                sleep(.1)
                if whatmsg == ".queer":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Zu ", queer, " Prozent queer! ")                   
                    elif lang == "en":
                        pyperclip.copy(" To ", queer, " percent queer! ")         
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                elif whatmsg == ".queer Simon" or whatmsg == ".queer simon" or whatmsg == "!queer Simon" or whatmsg == "!queer simon":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" Simon is fuckin homophobic!")
                    send()
                elif whatmsg == ".queer Lane" or whatmsg == ".queer lane" or whatmsg == ".queer Iane" or whatmsg == "!queer Lane"or whatmsg == "!queer lane":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Lane hat ganz klar 100 Prozent!")                  
                    elif lang == "en":
                        pyperclip.copy(" Lane has 100 percent, clearly!")                   
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.3)
                    pyautogui.press("enter")
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.queer', '')
                        sleep(.1)
                        pyperclip.copy(res_str + " ist zu " + queer + " Prozent queer! ")                   
                    elif lang == "en":
                        res_str = str.replace('!queer', '') 
                        sleep(.1)
                        pyperclip.copy(res_str + " is to " + queer + " percent queer! ")                 
                    else:
                        print("No correct language found, ignoring command...")
                    print ("The string after removal of character: " + res_str)
                    paste()
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("regenbogenflagge")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                
            elif whatmsg.startswith(".paar") or whatmsg.startswith("!couple"):
                lovemeter1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                lovemeter2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if whatmsg == ".paar" or whatmsg == "!couple":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Ein super Paar > " + lovemeter1 + ' und ' + lovemeter2)                    
                    elif lang == "en":
                        pyperclip.copy(" A perfect couple > " + lovemeter1 + ' and ' + lovemeter2)                 
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.paar', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " wäre ein super paar mir " + lovemeter2)
                    elif lang == "en":
                        res_str = str.replace('!couple', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " whould be a perfect couple with " + lovemeter2)                  
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                    
            elif whatmsg.startswith(".stundenplan") or whatmsg.startswith(".st") or whatmsg.startswith(".sp") or whatmsg.startswith(".timetable") or whatmsg.startswith(".tt"):
                def send_tt():
                    path = '/home/pi/timetable/' + day_individual + '.txt' # define the path of the timetable-file
                    print("Path: " + path) # print the path to terminal
                    timetablecontent = open(path, 'r').read() # open file
                    pyperclip.copy(timetablecontent) # copy file to clipboard
                    sleep(.8)
                    pt.keyDown("ctrl") # paste
                    sleep(.08) # paste
                    pt.press("v") # paste
                    sleep(.08) # paste
                    pt.keyUp("ctrl") # paste
                    sleep(.2)
                    pyautogui.press("enter") # send the message
                    pyperclip.copy("") # empty the clipboard
                
                if whatmsg.endswith("mo") or whatmsg.endswith("montag") or whatmsg.endswith("Montag") or whatmsg.endswith("monday"):
                    day_individual = "monday"
                    send_tt()
                elif whatmsg.endswith("di") or whatmsg.endswith("dienstag") or whatmsg.endswith("Dienstag") or whatmsg.endswith("tuesday"):
                    day_individual = "tuesday"
                    send_tt()
                elif whatmsg.endswith("mi") or whatmsg.endswith("mittwoch") or whatmsg.endswith("Mittwoch") or whatmsg.endswith("wednesday"):
                    day_individual = "wednesday"
                    send_tt()
                elif whatmsg.endswith("do") or whatmsg.endswith("donnerstag") or whatmsg.endswith("Donnerstag") or whatmsg.endswith("thursday"):
                    day_individual = "thursday"
                    send_tt()
                elif whatmsg.endswith("fr") or whatmsg.endswith("freitag") or whatmsg.endswith("Freitag") or whatmsg.endswith("friday"):
                    day_individual = "friday"
                    send_tt()
                elif whatmsg.endswith("sa") or whatmsg.endswith("samstag") or whatmsg.endswith("Samstag") or whatmsg.endswith("saturday") or whatmsg.endswith("so") or whatmsg.endswith("sonntag") or whatmsg.endswith("Sonntag") or whatmsg.endswith("sunday") or whatmsg.endswith("wo"):
                    day_individual = "weekend"
                    send_tt()
                else:
                    automatic = "no"
                    timetable()
                    
            elif whatmsg.startswith(".cool") or whatmsg.startswith("!cool"): # if messgae starts with cool
                sleep(.1)
                if lang == "de":
                    cool = random.choice([" Nah, nich so cool nur 0 bis 10 Prozent!", " Nicht wirklich. Gerade mal 10 bis 20 Prozent!", " Ca. 20 bis 30 Prozent... koennte besser sein...", " Eig. relativ okay, 40 bis 50 Prozent", " Recht nice du liegst Zwischen 50 und 60 Prozent", " Ganz cool, 60 bis 70 Prozent.", " Ich will mit dir befreundet sein! Zu 70 bis 80 Prozent cool!", " Super duper über mega cool! 80 bis 90 Prozent!", " Ich will dich heiraten! 90 bis 99 Prozent!", " Du bist ein Gott. Du hast naehmlich 100 Prozent!"]) # choose a random answer (in german, obviously)               
                elif lang == "en":
                    cool = random.choice([" No, not so cool. Only 0 up to 10 percent!", " Not really. Only 10 up to 20 percent!", " Between 20 and 30 percent... could be better...", " Actually not that bad, 40 up to 50 percent", " You are okay, you are between 50 and 60 percent!", " Very nice, 60 up to 70 Prozent.", " I want to be friends with you! You are to 70 up to 80 percent cool!", " Super mega cool! 80 up to 90 percent!", " I want to marry you! 90 up to 99 percent!", " You are a god. You have the 100 percent!"]) # choose a random answer (in english)                   
                else:
                    print("No correct language found, ignoring command...")
                if whatmsg == ".cool" or whatmsg == "!cool": # if it exactly equals to ".cool" move on with the code down here
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(cool) # write the random answer (defined above)
                    paste()
                    sleep(.2)
                    pyautogui.keyDown("shift") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    keyboard.press(":") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    pyautogui.keyUp("shift") # add "sunglasses"-emoji
                    sleep(.1) # add "sunglasses"-emoji
                    pyautogui.typewrite("sunglasses") # add "sunglasses"-emoji
                    sleep(.4) # add "sunglasses"-emoji
                    pyautogui.press("enter") # add "sunglasses"-emoji
                    sleep(.7)
                    pyautogui.press("enter")
                elif whatmsg == ".cool Simon" or whatmsg == ".cool simon" or whatmsg == "!cool Simon" or whatmsg == "!cool simon": # else if the message ".cool" equals to ".cool Simon" move on with this code down here
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" Simon cant be cool, he is fuckin homophobic!") # say that simon is homophobic (that is actually true)
                    send()
                else: # else write the message how cool somebody is with the name given in the message (if there is no name it will use the first method at this command)
                    str = whatmsg
                    print ("Original string: " + str)  # print the original string to the console
                    if lang == "de":
                        res_str = str.replace('.cool', '')  # remove the ".cool" in the string, so there will only stay the given name in it
                        print ("The string after removal of character: " + res_str) # print the result string (the name)
                        sleep(.1)
                        pyperclip.copy(" Ergebnis von" + res_str + " :" + cool) # type the result                  
                    elif lang == "en":
                        res_str = str.replace('!cool', '')  # remove the ".cool" in the string, so there will only stay the given name in it
                        print ("The string after removal of character: " + res_str) # print the result string (the name)
                        sleep(.1)
                        pyperclip.copy(" Result of" + res_str + " :" + cool) # type the result           
                    else:
                        print("No correct language found, ignoring command...")
                    paste()
                    sleep(.2)
                    pyautogui.keyDown("shift")
                    sleep(.1)
                    pt.press("space")
                    sleep(.1)
                    keyboard.press(":")
                    sleep(.1)
                    pyautogui.keyUp("shift")
                    sleep(.1)
                    pyautogui.typewrite("sunglasses")
                    sleep(.4)
                    pyautogui.press("enter")
                    sleep(.7)
                    pyautogui.press("enter")
                
            elif whatmsg.startswith(".witz") or whatmsg == "!joke":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" Ich fuehle mich so haesslich, so fett. Ich brauche ein Kompliment. > Du hast eine gute Beobachtungsgabe.")
                    elif spruch == "joke2":
                        pyperclip.copy(" Der Gefaengnisdirektor: Was wird nur Ihr armer Vater dazu sagen, dass sie schon wieder hier sind? > Fragen Sie ihn doch selbst. Er sitzt nur drei Zellen weiter!")
                    elif spruch == "joke3":
                        pyperclip.copy(" Warum ist ein Iglu rund? > Damit die Huskys nicht in die Ecken scheißen.")
                    elif spruch == "joke4":
                        pyperclip.copy(" Polizeikontrolle! Alkohol, Drogen? > Verkaufen Sie auch Pommes?")
                    elif spruch == "joke5":
                        pyperclip.copy(" Alle Kinder sitzen auf der Walze außer Gunther der liegt drunter.")
                    elif spruch == "joke6":
                        pyperclip.copy(" Alle Kinder sitzen ums Lagerfeuer außer Brigitte die sitzt in der Mitte.")
                    elif spruch == "joke7":
                        pyperclip.copy(" Alle kinder schlafen tief und munter, außer Gunther, der holt sich einen runter.")
                    elif spruch == "joke8":
                        pyperclip.copy(" Alle rennen aus dem brennenden Kino, nur nicht Abdul, der klemmt im Klappstuhl.")
                    elif spruch == "joke9":
                        pyperclip.copy(" Alle Kinder laufen über den Friedhof außer Hagen der wird begraben.")
                    elif spruch == "joke10":
                        pyperclip.copy(" Alle Kinder blieben vor der Klippe stehen außer Peter der ging noch nen Meter.")
                    elif spruch == "joke11":
                        pyperclip.copy(" Alle Kinder haben Haare außer Thorsten der hat Borsten.")
                elif lang == "en":
                    pyperclip.copy(" Jokes are not available in english jet!")              
                else:
                    print("No correct language found, ignoring command...")
                send()
                
            elif whatmsg == ".schwarzer-humor" or whatmsg == ".sh" or whatmsg == ".black-humor" or whatmsg == "!black-humor" or whatmsg == "!bh" or whatmsg == "!b-h":
                print("Recieved message:", whatmsg)
                spruch = random.choice(["joke1", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11", "joke12", "joke13"])
                if lang == "de":
                    if spruch == "joke1":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Schwarzer Humor ist Wasser fuer meine Seele. > Aber nicht fuer Afrika.") # copy the joke to clipboard
                    elif spruch == "joke2":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Wie nennt man es, wenn sich zwei obdachlose mit steinen abwerfen? > Kissenschlacht!")
                    elif spruch == "joke3":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was sagt ein einarmiger, der Karten mischen soll? > Mischen Impossible")
                    elif spruch == "joke4":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was macht ein Rollstuhlfahrer, wenn er sauer ist? > Am Rad drehen.")
                    elif spruch == "joke6":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR*: Was hat ein Mann ohne Beine? > Eier aus Bodenhaltung")
                    elif spruch == "joke7":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Auf dem Mars wurde Wasser gefunden. > Mars 1 - Afrika 0")
                    elif spruch == "joke8":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wie bekommt man am besten Kaugummi aus den Haaren? > Mit Krebs.")
                    elif spruch == "joke9":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wieso kaufen sich Waisenkinder ein IPhone 11? > Weil es beim IPhone 11 keinen Home-Button gibt.")
                    elif spruch == "joke10":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Was ist der Unterschied zwischen einer Pizza und einem Emo? > Die Pizza schneidet sich nicht selbst.")
                    elif spruch == "joke11":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Wieso gibt es in Afrika keine Medikamente? > Weil man sie nach dem Essen einnehmen muss.")
                    elif spruch == "joke12":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Was steht auf dem Grabstein einer Putzfrau? > Sie kehrt nie wieder.")
                    elif spruch == "joke13":
                        pyperclip.copy(" *ACHTUNG SCHWARZER HUMOR:* Warum schlagen Frauen immer mit links zu? > Weil sie keine Rechte haben.")
                elif lang == "en":
                    pyperclip.copy(" Black humor not available in english jet!")              
                else:
                    print("No correct language found, ignoring command...")
                send()
            
            elif whatmsg.startswith(".randomname") or whatmsg.startswith(".rn") or whatmsg.startswith("!randomname") or whatmsg.startswith("!rn"):
                name1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name3 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "Julian S.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name4 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name5 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "Elias L.", "Julian R.", "Julian S.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name6 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name7 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name8 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                name9 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "Julian R.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Simon", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if lang == "de":
                    name_lang1 = "Name"
                    name_lang = "Namen"
                elif lang == "en":
                    name_lang1 = "name"
                    name_lang = "names"                   
                else:
                    print("No correct language found, ignoring command...")
                if whatmsg == ".randomname" or whatmsg == ".rn" or whatmsg == "!randomname" or whatmsg == "!rn":
                    namelist = " 0 Arguments given. Expected 1. : Bitte gib eine Zahl an!"
                elif whatmsg.endswith("1"):
                    namelist = " 1 " + name_lang1 + " : " + name1
                elif whatmsg.endswith("2"):
                    namelist = " 2 " + name_lang + " : " + name1  + ", " + name2
                elif whatmsg.endswith("3"):
                    namelist = " 3 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3
                elif whatmsg.endswith("4"):
                    namelist = " 4 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4
                elif whatmsg.endswith("5"):
                    namelist = " 5 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5
                elif whatmsg.endswith("6"):
                    namelist = " 6 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6
                elif whatmsg.endswith("7"):
                    namelist = " 7 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6 + ", " + name7
                elif whatmsg.endswith("8"):
                    namelist = " 8 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6  + ", " + name7  + ", " + name8
                elif whatmsg.endswith("9"):
                    namelist = " 9 " + name_lang + " : " + name1  + ", " + name2  + ", " + name3  + ", " + name4  + ", " + name5  + ", " + name6  + ", " + name7  + ", " + name8  + ", " + name9
                print("Revieved message:", whatmsg)
                sleep(.3)
                pyperclip.copy(namelist)
                send() 
            
            elif whatmsg.startswith(".ship") or whatmsg.startswith("!ship"):
                lovemeter1 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Sabrina", "Simon", "Sunny", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                lovemeter2 = random.choice(["Lane", "Jonas", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Isabel", "Nora", "Nicole", "Anna", "Anna-Lena", "Cecile", "Dea", "Elias", "<NAME>.", "<NAME>.", "<NAME>.", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Lena", "Lina", "Louisa", "Luis", "Melissa", "Nico", "Noah", "Noel", "Sabrina", "Sabrina", "Simon", "Sunny", "Sunny", "Toni", "Vincent", "Korbinian", "Paul", "Tobias"])
                if whatmsg == ".ship" or whatmsg == "!ship":
                    print("one")
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    if lang == "de":
                        pyperclip.copy(" Ich shippe " + lovemeter1 + ' mit ' + lovemeter2)                  
                    elif lang == "en":
                        pyperclip.copy(" I ship " + lovemeter1 + ' with ' + lovemeter2)                        
                    else:
                        print("No correct language found, ignoring command...")
                    send()
                else:
                    print("two")
                    str = whatmsg
                    print ("Original string: " + str)
                    if lang == "de":
                        res_str = str.replace('.ship', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(res_str + " shippe ich mit " + lovemeter2)                   
                    elif lang == "en":
                        res_str = str.replace('!ship', '') 
                        print ("The string after removal of character: " + res_str)
                        sleep(.1)
                        pyperclip.copy(" I ship" + res_str + " with " + lovemeter2)                    
                    else:
                        print("No correct language found, ignoring command...")
                    send()

                def lovemeter_persons():
                    print("Revieved message:", whatmsg)
                    sleep(.3)
                    pyperclip.copy(" " + lovemeter_name + " passt super zu: " + lovemeter1)
                    send()

            else:
                print("No new messages!")
    def class1():
        pt.moveTo(group1)
        sleep(0.5)
        pt.click()
        sleep(.8)
        bot_main()
    def class2():
        pt.moveTo(group2) 
        sleep(0.5)
        pt.click()
        sleep(.8)
        bot_main()
    class1()
    class2()
#!/usr/bin/python3 # PLEASE READ EVERY LINE WHERE I COMMENTED "TODO"! YOU CAN SEARCH IT IN THE TEXT BY USING THE SEARCH TOOL OF YOUR TEXT EDITOR OR IDE! # INFO # This Script was made by "DasPrombelBread" (Lane)! # This program is standing under the MIT license, # you can copy it and do whatever you want with it. # Last updated: November 16, 2021 # define which edition of the program it is # define the version # define the name of the creator # set the location for config file # must be manually installed # must be manually installed (on most systems) # is installed by default # also installed by default # installed by default # import random. installed by default # time is also installed by default # installed by default # installed by default # must be manually installed on most systems # must be manually installed # define keyboard as Controller(). this is used by pynput # empty the clipboard # set language to german by default # write logs # paste # paste # paste # paste # paste # send the message # an basic while loop, repeat the code written down here # pt.press("pagedown") # press "pagedown"-key to go to the end of the chat # set the time format # date_now says which day of the week it is. 1 = monday, 2 = tuesday, ... # define the path of the timetable-file # print the path to terminal # open file # copy file to clipboard # paste # paste # paste # paste # paste # send the message # empty the clipboard # define the path of the timetable-file # print the path to terminal # open file # copy file to clipboard # paste # paste # paste # paste # paste # send the message # empty the clipboard # if current time starts with 06:30:1... am, start "timetable" function, else use the bot # press down left mouse button # stop pressing the left mouse button # copy the message # copy the message # copy the message # copy the message # copy the message # click into the void to remove the selection of the last message # define "whatmsg" with pyperclip.paste (the content in the clipboard) # set to default again # paste and the message # paste # paste # paste # paste # paste # define the bot_message function # press "a" to automatically get into the text field # delete the "a" and all other content that may be in the text field # put the "shift" key down # press the ":" key (only works when shift is down) # put the "shift" key up # write "robot", to call the "robot"-emoji # press enter to enter the "robot"-emoji # make a ":" again # paste and send the message # paste # paste # paste # paste # paste # send the message # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement # print the recieved message to the console (terminal) # write the info-message (with an interval of 0.1 seconds between every key) # write the info-message (with an interval of 0.1 seconds between every key) # if whatsapp-message (remember whatmsg is the content in the clipboard) equals to ".help" move to next line, else go to the next "if" ("elif") statement # print the recieved message to the console (terminal) # if whatsapp message starts with ".oracle" open this function # if the message contains "wann" (german word for "when") do this, else move to next "elif"-statement # print the recieved message to the console (terminal) # choose a random word as answer # type the answer # choose a random word as answer # type the answer # if the message starts with ".oracle wer" ("wer" = german word for "who") do this, else move to "else"-statement # print the revieved messahe to the console (terminal) # choose a random name from my school class # type the answer # choose a random name from my school class # type the answer # if the message ditn't include "wann" or "wer", type one of these random answers # choose a random answer # type the answer # choose a random answer # type the answer # copy the joke to clipboard #queer = random.choice(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100!!"]) # define the path of the timetable-file # print the path to terminal # open file # copy file to clipboard # paste # paste # paste # paste # paste # send the message # empty the clipboard # if messgae starts with cool # choose a random answer (in german, obviously) # choose a random answer (in english) # if it exactly equals to ".cool" move on with the code down here # write the random answer (defined above) # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # add "sunglasses"-emoji # else if the message ".cool" equals to ".cool Simon" move on with this code down here # say that simon is homophobic (that is actually true) # else write the message how cool somebody is with the name given in the message (if there is no name it will use the first method at this command) # print the original string to the console # remove the ".cool" in the string, so there will only stay the given name in it # print the result string (the name) # type the result # remove the ".cool" in the string, so there will only stay the given name in it # print the result string (the name) # type the result # copy the joke to clipboard