Esempio n. 1
0
def initNow(app: GraiaMiraiApplication, message: MessageChain, friend, loop):
    global setuList, haotuList
    getPicList()
    if type(friend) is Friend:
        asyncio.run_coroutine_threadsafe(app.sendFriendMessage(friend, message.create(
            [Plain("今日色图:{}份\n今日好图:{}份".format(len(setuList), len(haotuList)))])), loop)
    elif type(friend) is Group:
        asyncio.run_coroutine_threadsafe(app.sendGroupMessage(friend, message.create(
            [Plain("今日色图:{}份\n今日好图:{}份".format(len(setuList), len(haotuList)))])), loop)
Esempio n. 2
0
def fixPics(app: GraiaMiraiApplication, message: MessageChain, friend, loop):
    """
    修复图片感叹号

    :param app:
    :param message:
    :param friend: 这里表示friend或者group
    :param loop:
    :return:
    """
    dirs = pivixDownloader._ROOTDIC + "/" + getDate()
    for ls in pivixDownloader._MODE:
        dir = dirs + "/" + ls
        pivixDownloader.PicTransfer(dir)
    if type(friend) is Friend:
        asyncio.run_coroutine_threadsafe(app.sendFriendMessage(friend, message.create(
            [Plain("修好啦!没修好的就没救了".format(len(setuList), len(haotuList)))])), loop)
    elif type(friend) is Group:
        asyncio.run_coroutine_threadsafe(app.sendGroupMessage(friend, message.create(
            [Plain("修好啦!没修好的就没救了".format(len(setuList), len(haotuList)))])), loop)