Exemplo n.º 1
0
async def decodetweetid(session: CommandSession):
    if not headdeal(session):
        return
    await asyncio.sleep(0.2)
    stripped_arg = session.current_arg_text.strip()
    if stripped_arg == '':
        return
    res = decode_b64(stripped_arg)
    if res == -1:
        await session.send("唔orz似乎没有这个推特ID的缩写呢")
        return
    logger.info(CQsessionToStr(session))
    await session.send("推特ID的真身已判明(゚▽゚)/其名为:" + str(res))
Exemplo n.º 2
0
 def checkTweetId(a, ad):
     if a[:1] == '#':
         ta = a[1:]
         if not ta.isdecimal():
             return None
         res = mintweetID.find(lambda item, val: item[1] == val, int(ta))
         if res == None:
             return None
         return res[0]
     elif a.isdecimal() and int(a) > 1253881609540800000:
         return a
     else:
         res = decode_b64(a)
         if res == -1:
             return None
         return res