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 subscribe to specific channels? #1

Open
mhyousefi opened this issue Dec 1, 2019 · 0 comments
Open

How to subscribe to specific channels? #1

mhyousefi opened this issue Dec 1, 2019 · 0 comments

Comments

@mhyousefi
Copy link

Hi there

First of all, thanks for your cool repo.

In your example you do:

bot.connect()
bot.login(user=bot_username, password=bot_password)
bot.subscribe_to_messages()
bot.add_prefix_handler("", process_message)

The third line subscribes the bot to pretty much all channels. I would like to limit the bot to just a few. I realize that subscribe_to_messages() calls the subscribe, which has an input name (the name of the publication to subscribe). I tried setting it to my channel name, but I it didnt work, showing me this error log:

{"msg":"nosub","id":"2","error":{"isClientSafe":true,"error":404,"reason":"Subscription '<CHANNEL_NAME>' not found","message":"Subscription '<CHANNEL_NAME>' not found [404]","errorType":"Meteor.Error"}}

Any advice as to how I can subscribe to only a select number of channels?

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

1 participant