Exemplo n.º 1
0
async def process_start_command(message: types.Message):
    cmd = message.text + ks
    try:
        await message.answer(upcoming(), parse_mode='Markdown')
        logger.info(cmd + decorator.successMsg())

    except Exception as e:
        await message.answer(decorator.occurred() + '{}'.format(e))
Exemplo n.º 2
0
async def process_start_command(message: types.Message):
    cmd = message.text + ks
    try:
        await bot.send_message(message.from_user.id, netorare())
        logger.info(cmd + decorator.successMsg())

    except Exception as e:
        await message.answer(decorator.occurred() + '{}'.format(e))
        logger.info(e)
Exemplo n.º 3
0
async def process_start_command(message: types.Message):
    cmd = message.text + ks
    contents = requests.get(
        f'http://192.145.238.5/~pasirm5/v3/sessyoin/{rand_cos()}').json()
    try:
        getItem = contents['url']
        await bot.send_photo(message.from_user.id, getItem)
        logger.info(cmd + decorator.successMsg() + decorator.randObj())

    except:
        pass
Exemplo n.º 4
0
async def process_start_command(message: types.Message):
    cmd = message.text + " "
    contents = requests.get(
        f'https://nekobot.xyz/api/image?type={rand_neko()}').json()
    try:
        getItem = contents['message']
        await bot.send_message(message.from_user.id, getItem)
        logger.info(cmd + decorator.successMsg() + decorator.randObj())

    except:
        pass
Exemplo n.º 5
0
async def process_start_command(message: types.Message):

    contents = requests.get(
        f'https://purrbot.site/api/img/nsfw/{rand_purr()}/gif').json()
    try:
        getItem = contents['link']
        await bot.send_animation(message.from_user.id, getItem)
        logger.info(decorator.successMsg())

    except Exception as e:
        await message.answer(decorator.occurred() + '{}'.format(e))
Exemplo n.º 6
0
async def process_start_command(message: types.Message):
    if len(message.get_args()) != 0:
        contents = requests.get(
            f'{scathachBase}/{api.yande()}/?tags={message.get_args()}').json()
        getItem = contents['url']
        if not getItem:
            await bot.send_message(message.from_user.id,
                                   text=decorator.ErrorFlag())
            logger.info(decorator.badrequestMsg() + message.get_args())
        else:
            await bot.send_message(message.from_user.id, text=getItem)
            logger.info(decorator.successMsg() + message.get_args())

    else:
        await message.answer(decorator.ngaturArgs())
Exemplo n.º 7
0
async def process_start_command(message: types.Message):
    if len(message.get_args()) != 0:
        contents = requests.get(
            f'https://nekos.life/api/v2/img/{message.get_args()}').json()
        try:
            getItem = contents['url']
            await bot.send_animation(message.from_user.id, getItem)
            logger.info(decorator.successMsg() + message.get_args())

        except:
            await bot.send_message(message.from_user.id,
                                   text=decorator.ErrorFlag())
            logger.info(decorator.badrequestMsg() + message.get_args())
    else:
        await message.answer(decorator.ngaturArgs() + "\n" + decorator.nekos())
Exemplo n.º 8
0
async def process_start_command(message: types.Message):
    if len(message.get_args()) != 0:
        spell = message.get_args().lower()
        contents = requests.get(
            f'{scathachBase}/{api.crypto()}/?tags={spell}').json()
        getCoin = contents['coin']
        if not getCoin:
            await bot.send_message(message.from_user.id,
                                   text=decorator.ErrorFlag())
            logger.info(decorator.badrequestMsg() + spell)
        else:
            await message.answer(getCoin)
            logger.info(decorator.successMsg() + spell)

    else:
        await message.answer(decorator.ngaturArgs())
Exemplo n.º 9
0
async def process_start_command(message: types.Message):
    if len(message.get_args()) != 0:
        text = message.get_args().replace(" ", "_")
        heroesName = text.title()
        for r in (("Of", "of"), ("The", "the")):
            heroesName = heroesName.replace(*r)

        contents = requests.get(
            f'{scathachBase}/hero/?tags={heroesName}').json()
        getItem = contents['url']
        gb = f'https://www.dotabuff.com/assets/heroes/{text.replace("_","-").lower()}.jpg'
        if not getItem:
            await bot.send_message(message.from_user.id,
                                   text=decorator.ErrorFlag() +
                                   decorator.badHero())
            logger.info(decorator.badrequestMsg() + heroesName)
        else:
            await bot.send_photo(message.from_user.id,
                                 photo=gb,
                                 caption=getItem)
            logger.info(decorator.successMsg() + heroesName)

    else:
        await message.answer(decorator.ngaturArgs())