コード例 #1
0
async def _(bot: Bot, event: Event):
    if isinstance(event, PokeNotifyEvent):
        if event.is_tome() and event.user_id != event.self_id:
            await bot.send(event=event,
                           message=a[random.randint(0,
                                                    len(a) - 1)])
    else:
        await poke.finish()
コード例 #2
0
ファイル: pokeme.py プロジェクト: MangataTS/kaptreebot
async def _(bot: Bot, event: Event):
    if isinstance(event, PokeNotifyEvent):
        if event.is_tome() and event.user_id != event.self_id:
            l = len(a)
            k = random.randint(0, l - 1)
            while pre == k:
                k = random.randint(0, l - 1)
            last = k
            await bot.send(event=event, message=a[k], at_sender=True)