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

multitoken mode does not work #46

Closed
lukemin opened this issue Apr 7, 2022 · 10 comments
Closed

multitoken mode does not work #46

lukemin opened this issue Apr 7, 2022 · 10 comments

Comments

@lukemin
Copy link

lukemin commented Apr 7, 2022

.evn
API_ID=1012*****
API_HASH=ea8e8e41812******************
BOT_TOKEN=51304:AAGkmwTdRlcPSX*********
MULTI_TOKEN1=5250:AAF9or7yt4***
MULTI_TOKEN2=51304:AAGkmwTd**
BIN_CHANNEL=-1001651968922
PORT=8080
FQDN=domain name
HAS_SSL=True
NO_PORT=True

only the main bot with BOT_TOKEN worked. another bots did not

@DeekshithSH
Copy link
Contributor

DeekshithSH commented Apr 7, 2022

@lukemin Only see One Bot in The Bot Running URL?

@DeekshithSH
Copy link
Contributor

.evn API_ID=1012***** API_HASH=ea8e8e41812****************** BOT_TOKEN=5130_4:AAGkmwTdRlcPSX_********* MULTI_TOKEN1=5250:AAF9or7yt4*** MULTI_TOKEN2=51304:AAGkmwTd** BIN_CHANNEL=-1001651968922 PORT=8080 FQDN=domain name HAS_SSL=True NO_PORT=True

only the main bot with BOT_TOKEN worked. another bots did not

Means MULTI_TOKEN Bot's are Not Responding to Your Messages?

@lukemin
Copy link
Author

lukemin commented Apr 7, 2022

yes, MULTI_TOKEN Bot's are Not Responding to my Messages. I am running this script on my vps

@DeekshithSH
Copy link
Contributor

@lukemin Multi Client Bot's are not Coded to Respond to Messages

@lukemin
Copy link
Author

lukemin commented Apr 7, 2022

@lukemin Multi Client Bot's are not Coded to Respond to Messages

Is there any way to check the Multi Client Bots working or not?

@DeekshithSH
Copy link
Contributor

@lukemin You will See When Starting the Bot
Or Visit the Bot URL

@lukemin
Copy link
Author

lukemin commented Apr 7, 2022

@DeekshithSH
(venv) root@instance-20210817-1303:/home/ubuntu/TG-FileStreamBot# python3 -m WebStreamer

-------------------- Initializing Telegram Bot --------------------
------------------------------ DONE ------------------------------

---------------------- Initializing Clients ----------------------
Starting - Client 1
This will take some time, please wait...
Multi-Client Mode Enabled
------------------------------ DONE ------------------------------
--------------------- Initalizing Web Server ---------------------
------------------------------ DONE ------------------------------

------------------------- Service Started -------------------------
bot =>> ***bot
server ip =>> 0.0.0.0

When I vist the web, code are shown as bellow:
{"server_status": "running", "uptime": "30s", "telegram_bot": "@ru***_bot", "connected_bots": 2, "loads": {"bot1": 0, "bot2": 0}, "version": 2.2}

Does it mean all the bots working?

When I sent some photos to the main bot, the script crashed, logs as bellow:

[07/04/2022 20:18:44][ERROR] => 'Photo' object has no attribute 'file_name'
Traceback (most recent call last):
File "/home/ubuntu/TG-FileStreamBot/venv/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 222, in handler_worker
await handler.callback(self.client, *args)
File "/home/ubuntu/TG-FileStreamBot/WebStreamer/bot/plugins/stream.py", line 31, in media_receive_handler
stream_link = f"{Var.URL}{log_msg.message_id}/{quote_plus(get_name(m))}?hash={get_hash(log_msg)}"
File "/home/ubuntu/TG-FileStreamBot/WebStreamer/utils/file_properties.py", line 55, in get_name
return media.file_name or ""
AttributeError: 'Photo' object has no attribute 'file_name'

But when I send some videos, it works.

@DeekshithSH
Copy link
Contributor

@lukemin Ya i think it's a Error a Bug when Sending Photo The Bot Can't find a Name for The File. Wrench may fix it,

All Of Your Multi-Client Working

@lukemin
Copy link
Author

lukemin commented Apr 7, 2022

THX for your great help.

@lukemin lukemin closed this as completed Apr 7, 2022
@EverythingSuckz
Copy link
Owner

Only the main bot will be responding to messages, all other bots are just used for the webserver.

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

3 participants