# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#

from asyncio import sleep

from userbot import CMD_HELP
from userbot.events import register


@register(outgoing=True, pattern="^.fl(?: |$)(.*)")
async def f_load(event):
    event.pattern_match.group(1)
    await event.edit("`Carregamento iniciado...`")
    await sleep(1)
    await event.edit("0%")
    number = 1
    await event.edit(str(number) + "%   ▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █▍")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █▉")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███▉")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████▍")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████▍")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████▍")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████▉")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   █████████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████▊")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ██████████████▉")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████▎")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████▌")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████▊")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ███████████████▉")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████████")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████████▎")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████████▍")
    number = number + 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████████▌")
    number += 1
    await sleep(0.03)
    await event.edit(str(number) + "%   ████████████████▌\n`Carregamento completado!`")


CMD_HELP.update(
    {
        "fake_load": ".fl\
    \nInicia um carregamento falso."
    }
)
