Exemplo n.º 1
0
async def ubrec(bot, ev: CQEvent):
    uid = ev.user_id
    if not lmt.check(uid):
        await bot.send(ev,
                       f'您〇太快了,请稍等一会儿(剩余 {int(lmt.left_time(uid)) + 1}秒)',
                       at_sender=True)
        return
    lmt.start_cd(uid, 5)

    name = ev.message.extract_plain_text().strip()
    if not name:
        await bot.send(ev, '请发送"谁是"+别称,如"谁是霸瞳"')
        return
    id_ = chara.name2id(name)
    confi = 100
    guess = False
    if id_ == chara.UNKNOWN:
        id_, guess_name, confi = chara.guess_id(name)
        guess = True
    c = chara.fromid(id_)

    msg = ''
    if guess:
        lmt.start_cd(uid, 60)
        msg = f'兰德索尔似乎没有叫"{name}"的人...\n角色别称补全计划: github.com/Ice-Cirno/HoshinoBot/issues/5 \n您有{confi}%的可能在找{guess_name} '
        await bot.send(ev, msg)
        #msg = f'\n您有{confi}%的可能在找{guess_name} '

    if confi > 60 and R.rec(f'priconne/rec/rec_unit_{id_}_ub.mp3').exist:
        msg = R.rec(f'priconne/rec/rec_unit_{id_}_ub.mp3').cqcode
        await bot.send(ev, msg, at_sender=False)

    else:
        await bot.send(ev, f'暂时未收录对应语音,该宁来表演了~', at_sender=True)
Exemplo n.º 2
0
async def test_send_mp3(bot, ev):
    await bot.send(ev, R.rec('YUUDACHI/5.mp3').cqcode)
Exemplo n.º 3
0
async def sing(bot, ev):
    await bot.send(ev, R.rec('song.silk').cqcode)
Exemplo n.º 4
0
async def chat_roar(bot, ev):
    rec = random.choice(roar_audio)
    await bot.send(ev, R.rec(rec).cqcode)
Exemplo n.º 5
0
async def chat_hentai(bot, ev):
    rec = random.choice(hentai_audio)
    await bot.send(ev, R.rec(rec).cqcode)