Ejemplo n.º 1
0
 def __init__():
     """
     Connects to IRC
     """
     server = input_function("Server: ")
     channel = input_function("Channel: ")
     
     ircsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     ircsock.connect((server, 6667))
     
     ircsock.send("USER "+ botnick +" "+ botnick +" "+ botnick +" :Connected!\n") # user authentication
     ircsock.send("NICK "+ botnick +"\n") # assign the nickname
     ircsock.send("JOIN "+ channel +"\n") # connect to channel
def get_feedback():
    from chatterbot.utils.read_input import input_function

    text = input_function()

    if 'Yes' in text:
        return True
    elif 'No' in text:
        return False
    else:
        print('Please type either "Yes" or "No"')
        return get_feedback()
def get_feedback():
    from chatterbot.utils.read_input import input_function

    text = input_function()

    if 'Yes' in text:
        return True
    elif 'No' in text:
        return False
    else:
        print('Please type either "Yes" or "No"')
        return get_feedback()
Ejemplo n.º 4
0
 def process_input(self):
     """
     Read the user's input from the terminal.
     """
     user_input = input_function()
     return user_input
Ejemplo n.º 5
0
 def process_input(self, *args, **kwargs):
     """
     Read the user's input from the terminal.
     """
     user_input = input_function()
     return user_input
Ejemplo n.º 6
0
 def process_input(self, *args, **kwargs):
     """
     Read the user's input from the terminal.
     """
     user_input = input_function()
     return Statement(user_input)