示例#1
0
def main(login, debug, verbose, pid):
    if debug:
        logging.getLogger(__name__)
        coloredlogs.install(level='DEBUG')

    chatbot.default(settings.CHATBOT_DEFUALT)
    chatbot.login(enableCmdQR=True, hotReload=True)

    if not login:
        chatbot.run(debug=debug)
示例#2
0
文件: main.py 项目: SuyogAhuja/Virusc
def chat():
    if request.method == 'POST':
        Dict1 = request.form
        question = Dict1['question']
        return chatbot.run(question)

    else:
        return render_template('chatbot.html')
示例#3
0
import chatbot
import draw

# draw.randomThing()

username = "******"
client_id = "your_client_id"
token = "your_token"
channel = "your_channel"

chatbot.run(username, client_id, token, channel)
示例#4
0
        elif ans == "activatemenu":
            menu()
        elif ans == "customize":
            import options

            color = options.run()
            cursor.execute("update users set color=%s where usernumber like %s and name like %s and password like %s",
                           (color,usernumber, username, password))
            os.system("color" + " " + str(color))
            print("color changed")
            conn.commit()

        elif ans == "originalchatbot":
            import chatbot

            chatbot.run()
        else:
            if admin == "yes":
                if ans == "sql":
                    while True:
                        try:
                            sql = input("sql> ").strip()
                            if sql == "\\q":  # press \q to exit sql mode
                                break
                            else:
                                cursor.execute(sql)
                                print(cursor.fetchall())
                        except Exception as e:
                            print(e)
                elif ans == "resettable":  # these are the extra commands
                    resettable()