Giter Site home page Giter Site logo

bot's Introduction

22年2月7日

- 修改青龙 _id 字段为 id

21年12月2日

- 更新telethon依赖版本

bot's People

Contributors

coolclash avatar hydrahail-johnson avatar miniers avatar sumaikade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bot's Issues

/snode失败

青龙 机器人使用 /snode 失败

something wrong,I'm sorry
The data embedded in the reply markup buttons was too much (caused by EditMessageRequest)
1
2
请作者帮忙康康,感谢

bot机器人无法激活?

新注册的bot机器只要运行就提示没有userID,已经对接过的ID可以对接成功,请问是哪里的问题呢?

2021-08-12 15:59:52,679-asyncio-ERROR=> [default_exception_handler] Task exception was never retrieved
future: <Task finished name='Task-10' coro=<hello() done, defined at /jd/jbot/main.py:64> exception=ValueError('Could not find the input entity for PeerUser(user_id=1934278299) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.')>
Traceback (most recent call last):
File "/jd/jbot/main.py", line 69, in hello
await jdbot.send_message(chat_id, f'{str(word)}\n\n\t{info}', link_preview=False)
File "/usr/lib/python3.8/site-packages/telethon/client/messages.py", line 767, in send_message
entity = await self.get_input_entity(entity)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 461, in get_input_entity
raise ValueError(
ValueError: Could not find the input entity for PeerUser(user_id=1934278299) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.

QL2.8的myck貌似有问题,还请看下。

调用myck后运行日志提示:[qlenv] search-->JD_COOKIE-->eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiakRCbGZLeGNnQS1LbXhiMG5BcFB4WTcjN2xVYk9kRjBOSiNLN3VxcW1NU2Rad0NZemUyTDFqeW0wRk8iLCJpYXQiOjE2MjU1NTM3ODAsImV4cCI6MTYyNTgxMjk4MH0.n1BzJx3folZ90h0mB272ZnjQm19Z79WIAPYySZYJIsn6XHDaYH7ciXGoT0_LqoIx

机器人获取账号数量出错

image

实际账号不止3个,获取账号数量出错,升级重启ql bot也没能修复

之前正常,前几天掉CK,再登陆后机器人获取账号数量停留在3个,并且对应不上顺序
尝试cp env.sh cookie.sh cn env.db.cookie.db都没能解决
不知道卡在哪个错误的记录CK文件上
求助如何修复

交互时出现“something wrong,I'm sorry 'id'”的提示

查看run.log,发现在启动时有错误提示:
2022-03-05 19:45:42,416-jbot-INFO=> [load_module] Bot加载失败-->login.py-->database is locked

同时交互出错是比如输入/cron 测试,选择其中一个结果,点运行,即会出现如标题所述提示。
烦请赐教如何解决?

python3 -m jbot出错

oot@qinglong:/ql $ python3 -m jbot
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/ql/jbot/main.py", line 9, in
from .bot.update import version, botlog
File "/ql/jbot/bot.py", line 10, in
from .. import chat_id, jdbot, _ConfigDir, _ScriptsDir, _OwnDir, _LogDir, logger, TOKEN
ValueError: attempted relative import beyond top-level package

升级telethon后升级bot出现以下日志

求指导~~

2021-12-02 10:10:38,539-jbot-INFO=> [load_module] Bot加载失败-->bean.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:38,549-jbot-INFO=> [load_module] Bot加载失败-->reboot.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:43,593-jbot-INFO=> [load_module] Bot加载失败-->bean.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:43,596-jbot-INFO=> [load_module] Bot加载失败-->reboot.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:48,621-jbot-INFO=> [load_module] Bot加载失败-->usermsg.py-->database is locked
2021-12-02 10:10:53,635-jbot-INFO=> [load_module] Bot加载失败-->login.py-->database is locked
2021-12-02 10:10:58,646-jbot-INFO=> [load_module] Bot加载失败-->start.py-->database is locked

MTProxy代理问题·

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 67, in
jdbot = TelegramClient('bot', api_id, api_hash, connection=connectionType,
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 140, in _start
await self.connect()
File "/usr/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 513, in connect
if not await self._sender.connect(self._connection(
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 127, in connect
await self._connect()
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 227, in _connect
connected = await self._try_connect(attempt)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 277, in _try_connect
await self._connection.connect(timeout=self._connect_timeout)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 244, in connect
await self._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 106, in _connect
await super()._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 237, in _connect
self._init_conn()
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 386, in _init_conn
self._obfuscation = self.obfuscated_io(self)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 28, in init
self._decrypt) = self.init_header(
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 42, in init_header
raise ValueError(
ValueError: MTProxy secret must be a hex-string representing 16 bytes

一直都是这个错误,请问怎么解决

/chart /bean 报错

内网运行的一台虚拟机,通过frp内网穿透访问docke,机器人查询 bean 和 chart时会报错! 报错如下:

something wrong,I'm sorry HTTPSConnectionPool(host='127.0.0.1', port=443): Max retries exceeded with url: /?cdn=nohost (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1e4e2a9160>: Failed to establish a new connection: [Errno 111] Connection refused'))

加载失败

jbot-INFO=> [load_diy] JBot加载失败cannot import name 'cookies' from 'jbot.bot.utils' (/jd/jbot/bot/utils.py)

image

fake产品经理提需求~

建议在tg扫码获取cookies的时候,添加是否替换config.sh里面cookie的选项
由于pt_pin是固定的,可以根据pt_pin定位到对应的旧cookie.
感谢🙏!

报session冲突怎么解决呢

telethon.errors.rpcerrorlist.AuthKeyDuplicatedError: The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions (caused by InvokeWithLayerRequest)

说session被两个ip用了,我网上查了下说删掉session文件就可以了,不过我找了好久都没找到在哪里,我用的是v4 bot版

运行bot就生成nohup.log,内容如下

Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 1, in
from telethon import TelegramClient, connection
File "/usr/lib/python3.9/site-packages/telethon/init.py", line 1, in
from .client.telegramclient import TelegramClient
File "/usr/lib/python3.9/site-packages/telethon/client/init.py", line 21, in
from .downloads import DownloadMethods
File "/usr/lib/python3.9/site-packages/telethon/client/downloads.py", line 16, in
import aiohttp
File "/usr/lib/python3.9/site-packages/aiohttp/init.py", line 6, in
from .client import (
File "/usr/lib/python3.9/site-packages/aiohttp/client.py", line 36, in
from . import hdrs, http, payload
File "/usr/lib/python3.9/site-packages/aiohttp/http.py", line 7, in
from .http_parser import (
File "/usr/lib/python3.9/site-packages/aiohttp/http_parser.py", line 29, in
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/lib/python3.9/site-packages/aiohttp/helpers.py", line 732, in
def ceil_timeout(delay: Optional[float]) -> async_timeout.Timeout:
AttributeError: module 'async_timeout' has no attribute 'Timeout'

已挂t 别的容器却是正常

/bean命令报错

something wrong,I'm sorry
'latin-1' codec can't encode characters in position 201-206: ordinal not in range(256)

需求教程

安装过程中出现这个提示:WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

大佬,该怎么做?

setshort覆盖原命令问题

目前我shortcut.list存了一些有用的命令,但是偶尔我会设置一些新命令

但是如果用setshort的话会覆盖原来的命令。能新增一个命令来专门 新增shortcut吗

python3 -m jbot出错

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 1, in
from telethon import TelegramClient, connection
File "/usr/lib/python3.8/site-packages/telethon/init.py", line 1, in
from .client.telegramclient import TelegramClient
File "/usr/lib/python3.8/site-packages/telethon/client/init.py", line 23, in
from .auth import AuthMethods
ModuleNotFoundError: No module named 'telethon.client.auth'

命令/chart报错,怎么解决

您好,大佬,打扰您了,我使用机器人查看收支情况,怎么报错了(有的账号可以查),找了半天解决不了问题,特来问大佬,求解答

启动报错The api_id/api_hash combination is invalid

api_id和api_hash从网站上复制下来的,这个应该是没问题的,但是启动报了这个错。

Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 72, in
jdbot = TelegramClient('bot', API_ID, API_HASH,
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 182, in _start
await self.sign_in(bot_token=bot_token)
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 368, in sign_in
result = await self(request)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 79, in _call
result = await future
telethon.errors.rpcerrorlist.ApiIdInvalidError: The api_id/api_hash combination is invalid (caused by ImportBotAuthorizationRequest)

如果大佬知道的话,麻烦告知一下解决方案,谢谢。

新注册的TG,始终无法运行

2022-02-27 23:15:12,260-telethon.network.mtprotosender-ERROR=> [send] Request caused struct.error: 'I' format requires 0 <= number <= 4294967295: GetUsersRequest(id=[InputUser(user_id=5299254924, access_hash=0)])
2022-02-27 23:15:12,261-asyncio-ERROR=> [default_exception_handler] Task exception was never retrieved
future: <Task finished name='Task-9' coro=<new_ver() done, defined at /jd/jbot/main.py:21> exception=error("'I' format requires 0 <= number <= 4294967295")>
Traceback (most recent call last):
File "/jd/jbot/main.py", line 37, in new_ver
await jdbot.send_message(chat_id, f'机器人上新了\n{botlog}\n运行日志为log/bot/run.log\n\n\t{info}', link_preview=False)
File "/usr/lib/python3.8/site-packages/telethon/client/messages.py", line 767, in send_message
entity = await self.get_input_entity(entity)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 440, in get_input_entity
users = await self(functions.users.GetUsersRequest([
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 176, in send
state = RequestState(request)
File "/usr/lib/python3.8/site-packages/telethon/network/requeststate.py", line 17, in init
self.data = bytes(request)
File "/usr/lib/python3.8/site-packages/telethon/tl/tlobject.py", line 194, in bytes
return self._bytes()
File "/usr/lib/python3.8/site-packages/telethon/tl/functions/users.py", line 72, in _bytes
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/lib/python3.8/site-packages/telethon/tl/functions/users.py", line 72, in
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/lib/python3.8/site-packages/telethon/tl/types/init.py", line 11564, in _bytes
struct.pack('<I', self.user_id),
struct.error: 'I' format requires 0 <= number <= 4294967295

faketls模式的MTProxy连接失败

root@57be82dd7f0e:/ql $ python3 -m jbot
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/ql/jbot/__init__.py", line 67, in <module>
    jdbot = TelegramClient('bot', API_ID, API_HASH, connection=connectionType,
  File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 133, in start
    else self.loop.run_until_complete(coro)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 140, in _start
    await self.connect()
  File "/usr/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 513, in connect
    if not await self._sender.connect(self._connection(
  File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 127, in connect
    await self._connect()
  File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 227, in _connect
    connected = await self._try_connect(attempt)
  File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 277, in _try_connect
    await self._connection.connect(timeout=self._connect_timeout)
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 244, in connect
    await self._connect(timeout=timeout, ssl=ssl)
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 106, in _connect
    await super()._connect(timeout=timeout, ssl=ssl)
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 237, in _connect
    self._init_conn()
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 386, in _init_conn
    self._obfuscation = self.obfuscated_io(self)
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 28, in __init__
    self._decrypt) = self.init_header(
  File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 42, in init_header
    raise ValueError(
ValueError: MTProxy secret must be a hex-string representing 16 bytes

'ee5277cce9da9749bf9a5746e6090a46207777772e6d6963726f736f66742e636f6d'

/chart 1查看报表出错

电报执行 此命令 /chart 1
命令提示:
something wrong,I'm sorry
list index out of range
大佬这种情况应该怎么处理?在青龙里安装的

/set 命令无法正常运行

其他的命令都没有问题,就是/set命令会提示,缺少文件。Google了很久,在电报群里也求助了很多次,仓库里也找了很久的文件和说明发现都没有这个文件。希望可以的得到解答
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.