Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tg 公共频道有没有影响 #104

Closed
GAODBK opened this issue Nov 11, 2024 · 4 comments
Closed

tg 公共频道有没有影响 #104

GAODBK opened this issue Nov 11, 2024 · 4 comments

Comments

@GAODBK
Copy link

GAODBK commented Nov 11, 2024

问题描述

创建的是:tg公共频道,我不知道出现 “一天” 这样的提示文字,有没有影响
上传的环境变量:https://raw.githubusercontent.com/GAODBK/CloudFlare-ImgBed/refs/heads/main/img/uty.png

上传方式

web 拖拽上传时:控制台打印的是:

/login:1


        Failed to load resource: the server responded with a status of 401 ()
/upload?authCode=tbdtcyzm&serverCompress=true:1


        Failed to load resource: the server responded with a status of 400 ()
use-handlers.ts:30  pecode: "ERR_BAD_REQUEST"config: adapter: (3) ['xhr', 'http', 'fetch']data: FormData {}env: {FormData: ƒ, Blob: ƒ}headers: st {Accept: 'application/json, text/plain, */*', Content-Type: 'application/x-www-form-urlencoded'}maxBodyLength: -1maxContentLength: -1method: "post"onUploadProgress: t=> {…}timeout: 0transformRequest: [ƒ]transformResponse: [ƒ]transitional: {silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false}url: "/upload?authCode=tbdtcyzm&serverCompress=true"validateStatus: ƒ (e)xsrfCookieName: "XSRF-TOKEN"xsrfHeaderName: "X-XSRF-TOKEN"[[Prototype]]: Objectmessage: "Request failed with status code 400"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}response: {data: 'upload error, check your environment params!', status: 400, statusText: '', headers: st, config: {…}, …}status: 400stack: "AxiosError: Request failed with status code 400\n    at mt (https://bf8f615e.imgbed-3bm.pages.dev/js/app.e91a4edf.js:25:72650)\n    at XMLHttpRequest.v (https://bf8f615e.imgbed-3bm.pages.dev/js/app.e91a4edf.js:25:77679)\n    at sl.request (https://bf8f615e.imgbed-3bm.pages.dev/js/app.e91a4edf.js:25:85772)"[[Prototype]]: Error
s @ use-handlers.ts:30
@MarSeventh
Copy link
Owner

和频道类型无关,检查一下机器人权限等是否存在问题

@GAODBK
Copy link
Author

GAODBK commented Nov 13, 2024

和频道类型无关,检查一下机器人权限等是否存在问题

我自认为,添加Bot机器人为管理员这一步没有出错,

现在 我的怀疑是:我创建的第一个频道是“私有”的,提供的 TOKKEN ID 是唯一可上传使用的。

原因:

这个“私有的”可以上传图片到tg,虽然 项目并不能提供正确的图片路径,因为tg说:图片只能在频道查看

@MarSeventh
Copy link
Owner

没有遇到过这种情况,我自己用的频道也都是私有的。😂

@GAODBK
Copy link
Author

GAODBK commented Nov 14, 2024

和频道类型无关,检查一下机器人权限等是否存在问题

哎,对我来说 这个不错的项目,不能使用挺可惜,我觉得 应该是某一步多余操作,使图片无法上传了,

在 tg 申请的第一个 bot 机器人绑定了,一个私有的频道,缺点是:项目上无法提供图片的 url 地址,但在 tg 的频道上可以看到这张“仅限在此频道查看”图片

然后我 “停用并屏蔽机器人”和“退出频道”,重新创建一个 bot 机器人和一个“公共”的频道, 频道将机器人设置为管理员我认为Cloudflare写的几个值应该没有错

oh,不好意思,我的错,项目的要求是将 Botfather 中创建的机器人添加为管理员,我将Botfather添加为管理员,这是错误的做法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants