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

How to add multiple channels? #262

Open
sichokie opened this issue Aug 15, 2023 · 12 comments
Open

How to add multiple channels? #262

sichokie opened this issue Aug 15, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@sichokie
Copy link

How to add multiple channels in FORCE_SUB_CHANNEL if I want to give users multiple channel option to subscribe?

@rahulps1000 rahulps1000 added the enhancement New feature or request label Nov 3, 2023
@itzmadara
Copy link

I also Want To Know

@hazyfossa
Copy link

hazyfossa commented Nov 10, 2023

With the current way the feature is programmed it's impossible, it can only take one channel. However, i just reworked it in my fork so you can add as many channels as you want like this: FORCE_SUB_CHANNELS="ID1;ID2;ID3"

@hazyfossa
Copy link

Beware that this is in beta, and i'm currently waiting for maintainers to review the pull request #278 before this functionality becomes available

@itzmadara
Copy link

Beware that this is in beta, and i'm currently waiting for maintainers to review the pull request #278 before this functionality becomes available

Where is your Repo

@hazyfossa
Copy link

hazyfossa commented Nov 11, 2023

It's here, or you can just patch the original according to this commit

@itzmadara
Copy link

It's here, or you can just patch the original according to this commit

Put multiple FSUB Variable like admins

@itzmadara
Copy link

itzmadara commented Nov 11, 2023

It's here, or you can just patch the original according to this commit

There is an error python 3 can't open file main.py

@hazyfossa
Copy link

Oh right, main.py was just a simple import from bot, so i merged it with bot.py. Run bot.py instead

@cepheidev
Copy link

With the current way the feature is programmed it's impossible, it can only take one channel. However, i just reworked it in my fork so you can add as many channels as you want like this: FORCE_SUB_CHANNELS="ID1;ID2;ID3"

i get this error

Traceback (most recent call last): File "/workspace/bot.py", line 12, in <module> from config import API_HASH, APP_ID, LOGGER, TG_BOT_TOKEN, TG_BOT_WORKERS, FORCE_SUB_CHANNELS, CHANNEL_ID, PORT File "/workspace/config.py", line 35, in <module> FORCE_SUB_CHANNELS = int(os.environ.get("FORCE_SUB_CHANNELS", "0")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '-1001624775332;-1001551338411' Instance is unhealthy Instance is unhealthy Traceback (most recent call last): File "/workspace/bot.py", line 12, in <module> from config import API_HASH, APP_ID, LOGGER, TG_BOT_TOKEN, TG_BOT_WORKERS, FORCE_SUB_CHANNELS, CHANNEL_ID, PORT File "/workspace/config.py", line 35, in <module> FORCE_SUB_CHANNELS = int(os.environ.get("FORCE_SUB_CHANNELS", "0"))

@hazyfossa
Copy link

@cepheidev thx for the report, i think i fixed it now. I'm currently rewriting the config system, so things like this wont happen. Try to pull the update from the repo

@cepheidev
Copy link

@cepheidev thx for the report, i think i fixed it now. I'm currently rewriting the config system, so things like this wont happen. Try to pull the update from the repo

thanks for the reply, i thought its never been fix, I'll wait for the fixed repo

@lunaticsm
Copy link
Contributor

@cepheidev thx for the report, i think i fixed it now. I'm currently rewriting the config system, so things like this wont happen. Try to pull the update from the repo

do you have any update? because i cannot run it on koyeb

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

No branches or pull requests

6 participants