LXK0301京东签到脚本-自动提交互助码

LXK0301京东签到脚本-自动提交互助码

orzlee
2021-02-24 / 233 评论 / 9,009 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年05月08日,已超过1077天没有更新,若内容或图片失效,请留言反馈。

telegram.jpg

前言

今天24号,刚好是LXK0301助力码清除日期,晚上给忘记了,到中午才发现今天互助码重置。

瞬间感觉错误一个亿,之前就想过要折腾个自动提交互助码的脚本,就是太懒了。今天亡羊补牢,折腾折腾。有兴趣可以用阅读我之前的文章QuantumultX-京东签到撸京东豆openwrt-docker部署lxk0301京东自动签到脚本

安装Telegram-Cli

此安装环境是VPS,openwrt上安装用docker,当然VPS也可以使用docker!

科学上网必备,没有一个良好的网络环境为前提都是白折腾!!!

  • docker安装(推荐,省去一大堆麻烦事):
    镜像地址:ugeek/telegram-cli

    1. 安装镜像:

       docker create --name telegram-cli -e TZ=Asia/Shanghai -v 挂载本地目录:/root/.telegram-cli ugeek/telegram-cli:amd64
    2. 启动docker:

       docker start telegram-cli
    3. 执行telegram-cli命令行交互(先执行一次登陆,输入telegram注册的手机号码,号码记得加区号。)

       docker exec -it telegram-cli telegram-cli -N -W
  • 以下为编译安装步骤(docker或者编译二选一即可):

    1. 克隆telegram-cli:

       cd /root/work/telegram  ### 或者你自己想要存放的目录
       git clone --recursive https://github.com/vysheng/tg.git && cd tg
    2. 编译安装

       ### ubuntu
       sudo apt-get update
       sudo apt-get -y install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
       ./configure
       make

      如果编译安装出现如下错误:
      telegram-cil-error.png
      解决方法:

       apt-get install -y libgcrypt20-dev libssl-dev
       ./configure --disable-openssl --prefix=/usr CFLAGS="$CFLAGS -w"
       make

    申请Telegram APP Key并且登陆telegram-cli

    1. 首先到telegram-apps里申请一个telegram App key(登陆时电话号码记得加国际区号)。
      telegram-app-login.png

    2. 复制Public keys:
      app-key.png

    3. 创建一个文件保存Public keys:

       nano /root/work/telegram/bot_key.pub
       ###鼠标右键粘贴
       ctrl+o ##保存 按完记得敲车键
       ctrl+x ##退出
    4. 登陆telegram-cil

       /root/work/telegram/tg/bin/telegram-cli -k /root/work/telegram/bot_key.pub
       ###输入账号绑定的手机号码,记得加区号
       ###输入telegram App收到的验证码

      telegram-cil-login.png
      IOS锁屏就会提示offline,打开手机telegram app就会提示online。

    5. 测试一下命令:
      telegram-cil频道名称如果有空格用下划线代替。
      发送命令格式/root/work/telegram/tg/bin/telegram-cli -W -e "msg 频道名称 命令"

       ### 发送一条统计当前互助码池命令
       /root/work/telegram/tg/bin/telegram-cli -W -e "msg Turing_Lab_Bot /count_activity_codes"

      回显信息比较乱,自己看手机或PC telegram APP Turing_Lab_Bot机器人 消息就好了。

编写脚本

把互助码准备好,编写脚本:

### 创建一个文件,保存脚本
nano /root/work/telegram/submit_activity_codes.sh

2021-05-08 优化加载会话列表,resolve_username 只加载需要发送命令的两个BOT,避免会话太多出现奇奇怪怪的问题。

2021-03-08 优化了定时任务脚本,速度更快,不会中断了,之前的脚本有问题,会经常中断(原因是因为脚本中执行发送消息命令太快-W参数加载消息会话列表没有完成就已经发出命令,导致命令出错!)。

复制以下内容,互助码自己替换,其他活动互助码自己添加(多个互助码用&拼接):

#!/bin/bash

telegramPath=TG Path #记得替换你telegram-cli目录/xxx/tg/bin

(
  echo "resolve_username TuringLabbot"
  echo "resolve_username LvanLamCommitCodebot"
  sleep 5
  ### @Turing_Lab_Bot
  ###京喜财富岛
  echo "msg Turing_Lab_Bot /submit_activity_codes jxcfd 互助码"
  ###京东闪购盲盒
  echo "msg Turing_Lab_Bot /submit_activity_codes sgmh 互助码"
  ###京东环球挑战赛
  echo "msg Turing_Lab_Bot /submit_activity_codes jdglobal 互助码"
  ###惊喜工厂
  echo "msg Turing_Lab_Bot /submit_activity_codes jxfactory 互助码"
  ###东东工厂
  echo "msg Turing_Lab_Bot /submit_activity_codes ddfactory 互助码"
  ###东东萌宠
  echo "msg Turing_Lab_Bot /submit_activity_codes pet 互助码"
  ##种豆得豆
  echo "msg Turing_Lab_Bot /submit_activity_codes bean 互助码"
  ###东东农场
  echo "msg Turing_Lab_Bot /submit_activity_codes farm 互助码"
  ### @Commit_Code_Bot
  ###JD签到领现金 提交助力码
  echo "msg Commit_Code_Bot /jdcash 互助码"
  ###JD签到领现金 提交助力码
  echo "msg Commit_Code_Bot /jdcrazyjoy 互助码"
  echo "safe_quit"
) | ${telegramPath}telegram-cli -D

-D参数关闭了输出,调试的时候可以删除该参数(虽然没什么用,因为你命令发出去还没有等回显就已经结束命令了)。

docker 用户将最后一行脚本替换成) | docker exec -i telegram-cli telegram-cli -N,删除telegramPath=TG Path #记得替换你telegram-cli目录/xxx/tg/bin即可

保存脚本

ctrl+o ##保存 按完记得敲回车键
ctrl+x ##退出

赋予脚本可执行权限

chmod +x /root/work/telegram/submit_activity_codes.sh

测试的时候记得注释大部分命令,留一到两个就行了,频繁提交小心被Bot Ban号。

bash /root/work/telegram/submit_activity_codes.sh

看看手机接收到的通知,一般接收到通知无非就是提交成功或助力池已满。

添加crontab定时任务

助力池每次清空日期为每月1,8,16,24号,延迟10分钟后执行:

crontab -e
10 0 1,8,16,24 * * bash /root/work/telegram/submit_activity_codes.sh

结语

其他Bot签到什么的可以举一反三。

这下一劳永逸,省的忘记错过一个亿。最近京东活动也比较多,没有助力活动任务很难完成,助力才是京东活动的灵魂。

6
取消
扫码打赏
支付金额随意哦!

评论 (233)

取消
  1. 头像
    yhh
    Windows 10 · Google Chrome

    博主群晖docker 用户按照你的修改

    !/bin/bash

    (
    sleep 5
    echo "msg @YahahaNPO_bot /qd"
    echo "safe_quit"
    ) | docker exec -i telegram-cli telegram-cli -N -W
    测试还是:还没有加载消息会话列表,就开始发送指令,导致命令出错!
    root@dms:~# bash /volume1/docker/dk/telegram-cli/zlm1.sh
    : No such file or directory-cli/zlm1.sh: line 1: #!/bin/bash
    /volume1/docker/dk/telegram-cli/zlm1.sh: line 2: $'\r': command not found
    /volume1/docker/dk/telegram-cli/zlm1.sh: line 3: $'\r': command not found
    sleep: invalid time interval ‘10\r’
    Try 'sleep --help' for more information.
    change_user_group: can't find the user telegramd to switch to
    Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
    Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details.
    Telegram-cli uses libtgl version 2.1.0
    Telegram-cli includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit. (http://www.openssl.org/)
    I: config dir=[/root/.telegram-cli]

    msg @YahahaNPO_bot /qd
    FAIL: 38: can not parse arg #1

    msg YahahaNPO_bot /qd
    FAIL: 38: can not parse arg #1

    safe_quit

    6 [11:24] XXX
    7 [11:24] XXX
    8 [11:24] XXX
    9 [11:24] XXX
    10 [11:24] XXX
    11 [11:24] XXX

    User deleted user#1795982503 deleted
    User deleted user#1663824060 deleted
    User deleted user#1758530351 deleted

    All done. Exit
    halt

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ yhh

      延长脚本sleep时间,网络不行啊!

      回复
  2. 头像
    9655
    iPhone · Safari

    我是op的docker,到测试脚本那里都没问题,测试也正常发出,机器人也回复了。但是24号根本没发。所以我想问下在ssh运行最后那个定时命令后出来的是啥?想比较下我的对不对。

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 9655

      可能进程被杀了

      回复
  3. 头像
    怀念过去
    Windows 10 · Google Chrome

    这是什么情况呢!
    root@NAS:~# docker exec -it telegram-cli nano /root/work/telegram/bot_key.pub
    OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"nano\": executable file not found in $PATH": unknown
    root@NAS:~# docker exec -it telegram-cli /bin/sh

    nano /root/work/telegram/bot_key.pub

    /bin/sh: 1: nano: not found

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 怀念过去

      安装nano 或者用vi!

      回复
      1. 头像
        怀念过去
        Windows 10 · Google Chrome
        @ orzlee

        容器里面环境并不带这些,网上找的安装命令也都安装不了,VI也安装不了

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 怀念过去

          我没写在容器里面操作脚本吧?

          回复
  4. 头像
    怀念过去
    Windows 10 · Google Chrome

    找不到nona命令怎么办,docker安装的

    回复
  5. 头像
    纯小白
    MacOS · Google Chrome

    到这里就不知道怎么搞了

    root@OpenWrt:~# docker exec -it telegram-cli telegram-cli -N -W
    change_user_group: can't find the user telegramd to switch to
    Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
    Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details.
    Telegram-cli uses libtgl version 2.1.0
    Telegram-cli includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit. (http://www.openssl.org/)
    I: config dir=[/root/.telegram-cli]

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 纯小白

      你折腾的设备能科学上网吗?

      回复
      1. 头像
        纯小白
        MacOS · Google Chrome
        @ orzlee

        可以的 op开启了ssr

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 纯小白

          那你可能要自己研究下了,我是觉得还是科学上网的问题!

          回复
          1. 头像
            oniyou
            Windows 7 · Google Chrome
            @ orzlee

            有科学上网环境还是不行的,必须是国外服务器,或者用vpn,一般ssr等代理只能代理http,不能代理icmp,这个好像必须icmp能通才行

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ oniyou

              是的!有几个哥们在国内服务器折腾很久还是弄国外服务器去了!

              回复
  6. 头像
    纯小白
    MacOS · Google Chrome

    大佬 能把op下docker的怎么登陆telegram-cli详细说一下吗?感谢

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 纯小白

      跑脚本会提示你登录啊,先解决科学上网或者用国外vps!

      回复
  7. 头像
    么么哒
    iPhone · Safari

    大佬你昨天成功没?我昨天提交说满员了,但是我逐条手动发送没问题,我不知道是那个时候那个服务器爆满了错误,还是说脚本失效了?

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 么么哒

      提交的人多了总会有提交不成功的,提交时间提前点吧!

      回复
  8. 头像
    lj
    Android · Google Chrome

    /root/work/telegram/tg/bin/telegram-cli -k /root/work/telegram/bot_key.pub

    输入账号绑定的手机号码,记得加区号 输入telegram App收到的验证码

    我是openwrt docker运行 这一步就报错 FAIL: 38: can not find command '/root/tg/bin/telegram-cli'

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ lj

      仔细看文章,这不是docker版本命令!

      回复
  9. 头像
    unname
    Windows 7 · Google Chrome

    root@docker:~# docker exec -it jd bash /root/work/telegram/submit_activity_codes.sh
    bash: /root/work/telegram/submit_activity_codes.sh: No such file or directory

    帮忙看一下什么原因,登录交互没问题。

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ unname

      目录或者脚本不存在, /root/work/telegram/submit_activity_codes.sh

      回复
  10. 头像
    123
    Windows 10 · Google Chrome

    我创建了两个容器,不能多用户,请问怎么搞

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 123

      挂载目录要重新选一个,一个tg用户一个目录!

      回复
      1. 头像
        123
        Windows 10 · Google Chrome
        @ orzlee

        嗯,我创建了两个目录,一个1一个2,2目录里边没有配置文件,1里边有,都在home目录下,没用。。

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 123

          容器名怕是也要改!

          回复
          1. 头像
            123
            Windows 10 · Google Chrome
            @ orzlee

            你说得对,是我的锅

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ 123

              弄好了?

              回复
              1. 头像
                123
                Windows 10 · Google Chrome
                @ orzlee

                好了,谢谢

                回复
          2. 头像
            123
            Windows 10 · Google Chrome
            @ orzlee

            是的我就这么弄得,没用,算了

            回复
  11. 头像
    qzqqsq
    Windows 10 · Google Chrome

    大佬,openwrt x86按你的教程已成功安装并运行了telegram,但是卡在最后定时任务那里了,不知道怎么操作下去了,求教。

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ qzqqsq

      定时任务怎么了?什么问题?

      回复
      1. 头像
        qzqqsq
        Windows 10 · Google Chrome
        @ orzlee

        请问怎么在docker下的telegram添加定时任务?不知道具体的操作步骤是什么?

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ qzqqsq

          openwrt定时任务?

          回复
          1. 头像
            qzqqsq
            Windows 10 · Google Chrome
            @ orzlee

            怎么让telegram定时提交互助码的任务?谢谢?

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ qzqqsq

              crontab -e添加定时任务啊,文章里面不是写了。

              回复
              1. 头像
                qzqqsq
                Windows 10 · Google Chrome
                @ orzlee

                是在openwrt里的计划任务添加?

                回复
                1. 头像
                  orzlee 作者
                  Linux · Google Chrome
                  @ qzqqsq

                  嗯,我没在openwrt里面用,应该差不多!

                  回复
  12. 头像
    saysay
    Windows 10 · Google Chrome

    第三步提示这个怎么办 Error response from daemon: Container 121607f091d05a4e8fc33d135c8b3d19be3e3837e156f4901eec84aa501c30bf is not running

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ saysay

      没有启动docker?

      回复
      1. 头像
        saysay
        Windows 10 · Google Chrome
        @ orzlee

        我docker ps -a看 我运行第二步他就会提示多少多少秒前退出。运行不了。我第一步的目录是opt:/root/ 我想改到root目录试试行不行改咋写

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ saysay

          openwrt?你翻下回复看看,之前有个哥们也是openwrt,amd64要改成arm!

          回复
          1. 头像
            saysay
            Windows 10 · Google Chrome
            @ orzlee

            好了,再问下那后面的脚本以后要改的话要怎么改?

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ saysay

              改提交互助码命令就行了!命令格式tg bot都有说明!

              回复
  13. 头像
    么么哒
    Windows 10 · Google Chrome

    折腾了半天发现申请Telegram APP Key并且登陆telegram-cli 这步 docker不需要。。。。。

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 么么哒

      除非挂载的目录是之前登陆过的,里面还有呢登陆过的信息,你挂载其他目录看看!

      回复
    2. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 么么哒

      你不用自己的app key那就用的docker作者的,登陆是一定要的,不然怎么获取你的会话列表,怎么帮你发消息呢?

      回复
      1. 头像
        么么哒
        iPhone · Safari
        @ orzlee

        ok,成功了,美滋滋,不过有个机器人扑街了,等修复

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 么么哒

          什么扑街了?

          回复
          1. 头像
            么么哒
            iPhone · Safari
            @ orzlee

            不是有个互助码机器人崩溃了吗?我看回复是这样说的,那个脚本感觉还是要把时间提前一些,10分基本满员了

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ 么么哒

              嗯,确实要提前,估计提交人数太多了吧!

              回复
      2. 头像
        么么哒
        iPhone · Safari
        @ orzlee

        docker exec -it telegram-cli telegram-cli -N -W这步就登录了啊,我手动试了下可以发命令给机器人,等凌晨看看定时怎么样

        回复
  14. 头像
    法案是否
    Windows 10 · Google Chrome

    大佬我又来了,可以加TG私聊吗?还是想不明白你说我时dockers不需要docker exec -it telegram-cli telegram-cli -N -W这步,但是关键你这步不就写在docker安装第三步里面吗

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      @orzlee TG

      回复
  15. 头像
    法案是否
    Windows 10 · Google Chrome

    大佬这是我安装镜像的地址
    root@VM-0-12-ubuntu:~# docker create --name telegram-cli -e TZ=Asia/Shanghai -v opt:/root/.telegram-cli ugeek/telegram-cli:amd64
    91860c83f98d4cd133aa1f3b2a4d2de7fe378f895a15adfd1cb9b5c516cc5d1a
    我想问一下,我登陆telegram-cil的地址该怎么写呀
    root@VM-0-12-ubuntu:~# /root/work/telegram/tg/bin/telegram-cli -k /root/work/telegram/bot_key.pub
    -bash: /root/work/telegram/tg/bin/telegram-cli: No such file or directory

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      “docker exec -it telegram-cli telegram-cli -N -W” 直接运行这个命令,第一次会提示你登陆的!

      回复
      1. 头像
        法案是否
        Windows 10 · Google Chrome
        @ orzlee

        直接运行之后是这样的change_user_group: can't find the user telegramd to switch to
        Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
        Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details.
        Telegram-cli uses libtgl version 2.1.0
        Telegram-cli includes software developed by the OpenSSL Project
        for use in the OpenSSL Toolkit. (http://www.openssl.org/)
        I: config dir=[/root/.telegram-cli]

        回复
        1. 头像
          orzlee 作者
          Windows 10 · Google Chrome
          @ 法案是否

          登陆过了吗?登陆过了试试脚本吧,看看手机或者桌面telegram客户端是不是也有发送消息!

          回复
          1. 头像
            法案是否
            Windows 10 · Google Chrome
            @ orzlee

            不是的大佬,我直接输入docker exec -it telegram-cli telegram-cli -N -W,就是上面的代码反馈,也没让我登陆什么的。后来我就输入docker exec -it telegram-cli telegram-cli -1 -9783722 把我的TG手机号输进去了,就开始有反馈了,所以我也不懂所谓的提示登陆是什么意思。我目前时卡在~# /root/work/telegram/tg/bin/telegram-cli -k /root/work/telegram/bot_key.pub
            -bash: /root/work/telegram/tg/bin/telegram-cli: No such file or directory找不到目录。。

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ 法案是否

              你不用这种命令,这不是docker版本操作的!你等回显完了再输入“msg Turing_Lab_Bot /count_activity_codes”看看,或者你手机给其他会话发送消息,看看服务器上面有回显么!

              回复
              1. 头像
                法案是否
                Windows 10 · Google Chrome
                @ orzlee

                好吧,谢谢大佬的。确实不懂,还是老老实实每个月到点手动输入互助码,忙了一晚上还是没整明白

                回复
                1. 头像
                  orzlee 作者
                  Linux · Google Chrome
                  @ 法案是否

                  是国外服务器吧?输入“docker exec -it telegram-cli telegram-cli -N -W”没提示你输入手机号码?没有提示的话你继续输入“msg Turing_Lab_Bot /count_activity_codes”看看提示什么!

                  回复
    2. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      你没有仔细看我的文章,docker不是这样启动的!看脚本代码那里,加粗了docker命令说明!

      回复
  16. 头像
    法案是否
    Windows 10 · Google Chrome

    大佬,能不能把教程的路径都统一一下,小白痛苦呀。又找不到了。。。
    root@VM-0-12-ubuntu:~# /root/work/telegram/tg/bin/telegram-cli -k /root/work/telegram/bot_key.pub
    -bash: /root/work/telegram/tg/bin/telegram-cli: No such file or directory

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      你是用的docker还是自己编译的?选一种就好了!

      回复
      1. 头像
        法案是否
        Windows 10 · Google Chrome
        @ orzlee

        能不能教一下如何删除容器,我想全部重来了, 安装地址全乱了。。。

        回复
  17. 头像
    xiaotian
    Windows 10 · Google Chrome

    FAIL: 38: can not parse arg #1
    经常出现这个错误 然后消息就没有发送

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ xiaotian

      这个可能要调整sleep 时间,获取会话列表还没完成就开始执行命令了,你是不是服务器在国内?

      回复
      1. 头像
        xiaotian
        Windows 10 · Google Chrome
        @ orzlee

        我用的NAS 在国内 梯子是HK的

        回复
        1. 头像
          orzlee 作者
          Windows 10 · Google Chrome
          @ xiaotian

          这个错误就是没有加载完你当前会话列表,有几种可能:
          1.你的telegram-cli科学上网有问题。

          2.科学上网不通畅,telegram-cli没有加载完你当前会话列表,可能需要延长sleep时间。

          3.你没有和这两个BOT私聊过。

          回复
          1. 头像
            xiaotian
            Windows 10 · Google Chrome
            @ orzlee

            搜索了下 是会话列表太多 导致无法获取到 需要先手动发送一条消息才行 但是这样就达不到自动提交的目的了 不知道大佬有什么更好的解决办法

            回复
            1. 头像
              orzlee 作者
              Linux · Google Chrome
              @ xiaotian

              没有自动加载会话列表,脚本不行是吗?docker还是自己编译?

              回复
              1. 头像
                xiaotian
                Windows 10 · Google Chrome
                @ orzlee

                有加载列表 但是排在后面 获取不到 手动发送消息后 顶上去 才能获取到 用的 docker

                回复
                1. 头像
                  orzlee 作者
                  Linux · Google Chrome
                  @ xiaotian

                  我开始也遇到过,后面发现是没有来得及加载,-W参数就是加载会话列表的,我在脚本里面sleep 5就是等5秒后再执行命令,就怕会话没来得及加载!你说会话在下面?应该不涉及分页吧?置顶试试!

                  回复
  18. 头像
    法案是否
    Windows 10 · Google Chrome

    执行这一步nano /root/work/telegram/bot_key.pub时,提示Directory '/root/work/telegram' does not exist

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      /root/work/telegram目录不存在!

      回复
      1. 头像
        法案是否
        Windows 10 · Google Chrome
        @ orzlee

        大佬,我是按照步骤来的,怎么会目录不存在呢

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 法案是否

          因为我没写出来,这不是强制要求的,可以放到任何地方,你也可以创建这个目录“mkdir /root/work/telegram”后再继续操作!

          回复
  19. 头像
    豆子
    Android · Google Chrome

    我是用的docker安装的,登陆telegram-cil 请问这一步是在哪执行呢?docker exec -it telegram-cli里吗?

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 豆子

      是的,没登录会要求你登陆的!

      回复
  20. 头像
    法案是否
    Windows 10 · Google Chrome

    我是VPS,第一步安装镜像就出现问题,麻烦大佬看一下
    root@VM-0-12-ubuntu:~# docker create --name telegram-cli -e TZ=Asia/Shanghai -v 挂载本地目录:/root/.telegram-cli ugeek/telegram-cli:amd64
    Error response from daemon: create 挂载本地目录: "挂载本地目录" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path

    回复
    1. 头像
      orzlee 作者
      Linux · Google Chrome
      @ 法案是否

      挂载目录替换成你vps路径啊!

      回复
      1. 头像
        法案是否
        Windows 10 · Google Chrome
        @ orzlee

        大佬再请教一下,我在执行TG行交互命令这里不会了。
        root@VM-0-12-ubuntu:~# docker exec -it telegram-cli telegram-cli -N -W
        change_user_group: can't find the user telegramd to switch to
        Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
        Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details.
        Telegram-cli uses libtgl version 2.1.0
        Telegram-cli includes software developed by the OpenSSL Project
        for use in the OpenSSL Toolkit. (http://www.openssl.org/)
        I: config dir=[/root/.telegram-cli]

        回复
        1. 头像
          orzlee 作者
          Linux · Google Chrome
          @ 法案是否

          登陆了没有?登陆了跑脚本就好了!这里输入“quit”或者ctrl+c退出就好了!

          回复