async def look_tw_calendar(bot, ctx, match): is_now = match.group(1) == '当前' is_future = match.group(1) == '预定' is_all = not match.group(1) if is_now: await bot.send(ctx, text2CQ(await db_message(svtw, 'tw', 'now'), font), at_sender=True) if is_future: await bot.send(ctx, text2CQ(await db_message(svtw, 'tw', 'future'), font), at_sender=True) if is_all: await bot.send(ctx, text2CQ(await db_message(svtw, 'tw', 'all'), font), at_sender=True)
def infos2pic(infos: List[dict]) -> str: texts = [] for info in infos: text = f"标题: {info['标题']}\n时间: {info['时间']}\n======" texts.append(text) texts = '\n'.join(texts) return text2CQ(texts,font3)
async def push_bl_calendar(): await svtw.broadcast(text2CQ(await db_message(svtw, 'tw'), font), 'calendar-tw')
async def push_bl_calendar(): await svbl.broadcast(text2CQ(await db_message(svbl, 'bili'), font), 'calendar-bilibili')
async def push_jp_calendar(): await svjp.broadcast(text2CQ(await db_message(svjp, 'jp'), font), 'calendar-jp')