Пример #1
0
 def setUp(self):
     database.create_users_table()
     database.create_restaurant_table()
     database.create_orders_table()
     database.create_taxes_table()
     database.register('Barney', '420', "Mclarens")
                        InlineKeyboardButton(
                            text='اطلاع برسون که درخواستش ثبت شد.',
                            callback_data='send_your_request_added')
                    ]]))

                app.send_message(user_id,
                                 text=MESSAGE_REQUEST_IN_QUEUE,
                                 reply_markup=KEYBOARD_HELP)

                change_user_status(user_id=user_id, status=STATUS_NONE)

        else:
            app.send_message(user_id, text=MESSAGE_WRONG_TEXT)


if __name__ == '__main__':
    #files
    database.create_files_table()

    #users
    database.create_users_table()

    #initial admin
    exe_query('''INSERT OR IGNORE INTO users VALUES(?,?,?)''',
              (HEAD_ADMIN_ID, STATUS_NONE, 1))

    #admin_save_data
    data = {}

    app.run()
def main():
    database.create_users_table()
    database.create_restaurant_table()
    database.create_orders_table()
    database.create_taxes_table()
    start_menu()