zoukankan      html  css  js  c++  java
  • 微信机器人 细腻化

    f = 't.txt'
    l = []
    with open(f, 'r', encoding='utf-8') as fr:
        for i in fr:
            l.append(i)
    
    # 导入模块
    from wxpy import *
    
    # 初始化机器人,扫码登陆
    bot = Bot()
    
    import time
    
    while True:
        # 机器人账号自身
        myself = bot.self
        # 向文件传输助手发送消息
        s = l[0]
        s = '{}{}'.format(s, time.time())
        del l[0]
        bot.file_helper.send(s)
        time.sleep(0.3)
    

      

    f = 't.txt'
    l = []
    with open(f, 'r', encoding='utf-8') as fr:
        for i in fr:
            l.append(i)
    
    # 导入模块
    from wxpy import *
    
    # 初始化机器人,扫码登陆
    bot = Bot()
    
    import time
    
    while True:
        # 机器人账号自身
        myself = bot.self
        # 向文件传输助手发送消息
        s = l[0]
        s = '{}{}'.format(s, time.time())
        del l[0]
        # bot.file_helper.send(s)
        groups_o = bot.groups(update=False, contact_only=False)
        for i in groups_o:
            if i.nick_name == '有钱的大群':
                i.send('早')
        time.sleep(0.3)
    

      

  • 相关阅读:
    小端大端
    位域
    c++ 2.1 编译器何时创建默认构造函数
    python 内置&&递归
    python返回值与局部全局变量
    python file
    python set
    python 字典的函数
    python FileError
    python pickle
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8830092.html
Copyright © 2011-2022 走看看